From 964bf503a63a1f710919eff02c7d4bf4ffdbf2d6 Mon Sep 17 00:00:00 2001 From: Alexander Udalov Date: Thu, 22 Mar 2018 21:28:21 +0100 Subject: [PATCH] Fix warning about kotlin-reflect-api bundling Kotlin Runtime This fixes the "Some JAR files in the classpath have the Kotlin Runtime library bundled into them" warning when compiling all modules that depend on kotlin-reflect-api. This warning is reported on jars in the classpath which look like standard library artifacts, but in fact are not because their manifest does not say so. With this change, we're now writing the manifest of standard library artifacts to the resulting jar of kotlin-reflect-api, with the standard library component name "internal" (in fact, it doesn't affect anything here, any name would be OK) to make the compiler believe that this is actually a standard library jar --- libraries/reflect/api/build.gradle | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libraries/reflect/api/build.gradle b/libraries/reflect/api/build.gradle index 54ad2ee793a..2d04340cac1 100644 --- a/libraries/reflect/api/build.gradle +++ b/libraries/reflect/api/build.gradle @@ -30,3 +30,7 @@ compileKotlin { "-Xdump-declarations-to=${buildDir}/reflect-declarations.json"] } } + +jar { + manifestAttributes(manifest, project, "internal") +}