Update gradle to 8.14.1 and shadow to 8.3.6
This commit is contained in:
1 parent
639f815d45
commit
892d76432c
2 files changed
+11
-20
No files matched your search
+10
-19
@@ -1,8 +1,7 @@
|
||||
plugins {
|
||||
id("com.gradleup.shadow") version "8.3.6" // Import shadow API.
|
||||
java // Tell gradle this is a java project.
|
||||
id("io.github.goooler.shadow") version "8.1.8"
|
||||
eclipse // Import eclipse plugin for IDE integration.
|
||||
kotlin("jvm") version "1.9.23" // Import kotlin jvm plugin for kotlin/java integration.
|
||||
}
|
||||
|
||||
java {
|
||||
@@ -25,11 +24,14 @@ tasks.named<ProcessResources>("processResources") {
|
||||
filesMatching("plugin.yml") {
|
||||
expand(props)
|
||||
}
|
||||
from("LICENSE") { // Bundle license into .jars.
|
||||
into("/")
|
||||
}
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
|
||||
gradlePluginPortal()
|
||||
maven {
|
||||
url = uri("https://repo.purpurmc.org/snapshots")
|
||||
}
|
||||
@@ -38,45 +40,34 @@ repositories {
|
||||
dependencies {
|
||||
compileOnly("org.purpurmc.purpur:purpur-api:1.19.4-R0.1-SNAPSHOT") // Declare purpur API version to be packaged.
|
||||
compileOnly("io.github.miniplaceholders:miniplaceholders-api:2.2.3") // Import MiniPlaceholders API.
|
||||
|
||||
}
|
||||
|
||||
tasks.withType<AbstractArchiveTask>().configureEach {
|
||||
tasks.withType<AbstractArchiveTask>().configureEach { // Ensure reproducible .jars
|
||||
isPreserveFileTimestamps = false
|
||||
isReproducibleFileOrder = true
|
||||
}
|
||||
|
||||
tasks.shadowJar {
|
||||
exclude("io.github.miniplaceholders.*") // Exclude the MiniPlaceholders package from being shadowed.
|
||||
archiveClassifier.set("") // Use empty string instead of null.
|
||||
minimize()
|
||||
}
|
||||
|
||||
tasks.jar {
|
||||
tasks.build {
|
||||
dependsOn(tasks.shadowJar)
|
||||
archiveClassifier.set("part")
|
||||
}
|
||||
|
||||
tasks.shadowJar {
|
||||
archiveClassifier.set("") // Use empty string instead of null
|
||||
from("LICENSE") {
|
||||
into("/")
|
||||
}
|
||||
}
|
||||
|
||||
tasks.jar {
|
||||
dependsOn("shadowJar")
|
||||
archiveClassifier.set("part")
|
||||
}
|
||||
|
||||
tasks.withType<JavaCompile>().configureEach {
|
||||
options.compilerArgs.add("-parameters")
|
||||
options.compilerArgs.add("-Xlint:deprecation") // Triggers deprecation warning messages.
|
||||
options.encoding = "UTF-8"
|
||||
options.isFork = true
|
||||
}
|
||||
|
||||
kotlin {
|
||||
jvmToolchain(17)
|
||||
}
|
||||
|
||||
java {
|
||||
toolchain {
|
||||
languageVersion = JavaLanguageVersion.of(17)
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.1-bin.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
||||
Reference in new issue
Block a user