Skip to content

Commit 8eba785

Browse files
committed
fixup! Declare byte-buddy as 'implementation' dependency instead of shading.
1 parent 614980d commit 8eba785

File tree

1 file changed

+6
-11
lines changed

1 file changed

+6
-11
lines changed

kotlinx-coroutines-debug/build.gradle.kts

+6-11
Original file line numberDiff line numberDiff line change
@@ -58,19 +58,14 @@ val jar by tasks.existing(Jar::class) {
5858
)
5959
)
6060
}
61+
6162
// add module-info.class to the META-INF/versions/9/ directory.
6263
dependsOn(tasks.compileModuleInfoJava)
63-
doLast {
64-
// We can't do that directly with the shadowJar task because it doesn't support replacing existing files.
65-
val zipPath = this@existing.outputs.files.singleFile.toPath()
66-
val zipUri = URI.create("jar:${zipPath.toUri()}")
67-
val moduleInfoFilePath = tasks.compileModuleInfoJava.get().outputs.files.asFileTree.matching {
68-
include("module-info.class")
69-
}.singleFile.toPath()
70-
FileSystems.newFileSystem(zipUri, emptyMap<String, String>()).use { fs ->
71-
val moduleInfoFile = fs.getPath("META-INF/versions/9/module-info.class")
72-
Files.copy(moduleInfoFilePath, moduleInfoFile, StandardCopyOption.REPLACE_EXISTING)
73-
}
64+
from(tasks.compileModuleInfoJava.get().outputs.files.asFileTree.matching {
65+
include("module-info.class")
66+
}) {
67+
this.duplicatesStrategy = DuplicatesStrategy.INCLUDE
68+
into("META-INF/versions/9")
7469
}
7570
}
7671

0 commit comments

Comments
 (0)