From c1decd81aea34bfd675976983859459b63fdea91 Mon Sep 17 00:00:00 2001 From: Leonid Startsev Date: Mon, 7 Aug 2023 19:52:25 +0200 Subject: [PATCH] Use JavaCompile.destinationDirectory instead of the whole task as a source directory for copying module-info.class to the multi-release jar. This ensures that no additional files except java compiler output get into jar. Fixes #2398 --- buildSrc/src/main/kotlin/Java9Modularity.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildSrc/src/main/kotlin/Java9Modularity.kt b/buildSrc/src/main/kotlin/Java9Modularity.kt index 99b174013a..73621d8a26 100644 --- a/buildSrc/src/main/kotlin/Java9Modularity.kt +++ b/buildSrc/src/main/kotlin/Java9Modularity.kt @@ -82,7 +82,7 @@ object Java9Modularity { ) // add the resulting module descriptor to this target's artifact - artifactTask.from(compileModuleTask) { + artifactTask.from(compileModuleTask.map { it.destinationDirectory }) { if (multiRelease) { into("META-INF/versions/9/") }