fix: comment out unneeded special case
ci/woodpecker/push/docs Pipeline was successful Details
ci/woodpecker/push/jfmod Pipeline was successful Details

This commit is contained in:
Johannes Frohnmeyer 2024-04-10 13:58:37 +02:00
parent 763f3c6ed4
commit 1e93e0f793
Signed by: Johannes
GPG Key ID: E76429612C2929F4
1 changed files with 15 additions and 15 deletions

View File

@ -34,18 +34,18 @@ dependencies {
// workaround to ensure our custom System.LoggerFinder is initialized early
// ideally, we would use the configuration API, but that seems to cause a class loading issue with fabric loader
tasks.shadowJar {
val path = "META-INF/services/io.gitlab.jfronny.libjf.LoaderGlue"
val field = ServiceFileTransformer::class.java.getDeclaredField("serviceEntries").apply { isAccessible = true }
exclude(path)
transform(object: ServiceFileTransformer() {
private val serviceEntries get() = field.get(this) as MutableMap<String, Any>
override fun transform(context: TransformerContext?) {
super.transform(context)
(serviceEntries[path] as ByteArrayOutputStream).run {
reset()
file("src/main/resources/$path").inputStream().use { IOUtil.copy(it, this) }
}
}
})
}
//tasks.shadowJar {
// val path = "META-INF/services/io.gitlab.jfronny.libjf.LoaderGlue"
// val field = ServiceFileTransformer::class.java.getDeclaredField("serviceEntries").apply { isAccessible = true }
// exclude(path)
// transform(object: ServiceFileTransformer() {
// private val serviceEntries get() = field.get(this) as MutableMap<String, Any>
// override fun transform(context: TransformerContext?) {
// super.transform(context)
// (serviceEntries[path] as ByteArrayOutputStream).run {
// reset()
// file("src/main/resources/$path").inputStream().use { IOUtil.copy(it, this) }
// }
// }
// })
//}