Bump to 2.1, deprecated LoggerProvider#error, change version mathcing to return 1.21 on any version that is not b1.7.3, remove leftover classes.
This commit is contained in:
parent
b227ef18e2
commit
e19d169425
10 changed files with 22 additions and 85 deletions
|
|
@ -4,7 +4,7 @@ plugins {
|
|||
}
|
||||
|
||||
group = "org.adrianvictor"
|
||||
version = "2.0"
|
||||
version = "2.1.1"
|
||||
val buildEnv = System.getenv("BUILD_CHANNEL")
|
||||
?: if (System.getenv("JITPACK") != null) "jitpack" else "local"
|
||||
|
||||
|
|
@ -86,16 +86,10 @@ mcVersions.forEach { ver ->
|
|||
}
|
||||
}
|
||||
|
||||
tasks.register("buildAll") {
|
||||
dependsOn(tasks.withType<Jar>())
|
||||
}
|
||||
|
||||
// Task to merge service files
|
||||
val prepareServiceFiles = tasks.register("prepareServiceFiles") {
|
||||
val outputDir = layout.buildDirectory.dir("generated/service-files")
|
||||
val serviceFile = "META-INF/services/org.adrianvictor.lib.versioning.VersionedServiceRegistrar"
|
||||
|
||||
// Define inputs
|
||||
val inputFiles = mcVersions.map { ver -> file("src/$ver/resources/$serviceFile") }.filter { it.exists() }
|
||||
inputs.files(inputFiles)
|
||||
outputs.dir(outputDir)
|
||||
|
|
@ -139,7 +133,7 @@ tasks.named<Jar>("jar") {
|
|||
|
||||
tasks.register<Jar>("bundleAll") {
|
||||
dependsOn("jar")
|
||||
// This is now redundant but we keep it for compatibility with previous instructions
|
||||
|
||||
from(sourceSets["main"].output)
|
||||
mcVersions.forEach { ver ->
|
||||
from(sourceSets[ver].output) {
|
||||
|
|
@ -147,7 +141,6 @@ tasks.register<Jar>("bundleAll") {
|
|||
}
|
||||
}
|
||||
|
||||
// Include the merged service file
|
||||
from(prepareServiceFiles)
|
||||
|
||||
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
||||
|
|
@ -187,7 +180,6 @@ tasks.withType<JavaCompile> {
|
|||
/* ----------------------------------------- */
|
||||
|
||||
tasks.runServer {
|
||||
minecraftVersion("1.21.1")
|
||||
// Include ONLY the all-implementations jar as the plugin
|
||||
minecraftVersion("1.21.11")
|
||||
pluginJars.setFrom(tasks.named("bundleAll"))
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue