Merge remote-tracking branch 'origin/main'

This commit is contained in:
天クマ 2026-05-23 22:02:33 -03:00
commit 8272a98e9c
2 changed files with 23 additions and 5 deletions

View file

@ -103,12 +103,18 @@ val prepareServiceFiles = tasks.register("prepareServiceFiles") {
doLast {
val registrars = mutableSetOf<String>()
inputFiles.forEach { file ->
registrars.addAll(file.readLines().filter { it.isNotBlank() })
println("Checking file: ${file.absolutePath}, exists: ${file.exists()}")
if (file.exists()) {
val lines = file.readLines().filter { it.isNotBlank() }
println("Found lines: $lines")
registrars.addAll(lines)
}
}
val mergedFile = outputDir.get().file(serviceFile).asFile
mergedFile.parentFile.mkdirs()
mergedFile.writeText(registrars.joinToString("\n"))
println("Merged service file content: \n${registrars.joinToString("\n")}")
}
}
@ -122,9 +128,10 @@ tasks.register<Jar>("bundleAll") {
from(prepareServiceFiles) {
into("META-INF/services")
include("org.adrianvictor.lib.versioning.VersionedServiceRegistrar")
duplicatesStrategy = DuplicatesStrategy.INCLUDE
}
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
duplicatesStrategy = DuplicatesStrategy.INCLUDE
archiveClassifier.set("all-implementations")
archiveVersion.set(project.version.toString())
@ -162,5 +169,6 @@ tasks.withType<JavaCompile> {
tasks.runServer {
minecraftVersion("1.21.1")
pluginJars.from(tasks.named("jarR1_21"))
// Include ONLY the all-implementations jar as the plugin
pluginJars.setFrom(tasks.named("bundleAll"))
}