From 86ba5ebf29c2738e4bcd361ed3def21c72a4bfa5 Mon Sep 17 00:00:00 2001 From: Ilya Gorbunov Date: Tue, 18 Sep 2018 20:37:22 +0300 Subject: [PATCH] Mix kotlin-annotations-jvm with kotlin-reflect into proguard So it can strip these annotations from the resulting jar. #KT-26929 Fixed --- libraries/reflect/build.gradle.kts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libraries/reflect/build.gradle.kts b/libraries/reflect/build.gradle.kts index dd797ef8b31..dfe77833f8b 100644 --- a/libraries/reflect/build.gradle.kts +++ b/libraries/reflect/build.gradle.kts @@ -39,6 +39,7 @@ val libsDir = property("libsDir") val proguardDeps by configurations.creating +val proguardAdditionalInJars by configurations.creating val shadows by configurations.creating { isTransitive = false } @@ -49,7 +50,7 @@ dependencies { compile(project(":kotlin-stdlib")) proguardDeps(project(":kotlin-stdlib")) - proguardDeps(project(":kotlin-annotations-jvm")) + proguardAdditionalInJars(project(":kotlin-annotations-jvm")) proguardDeps(files(firstFromJavaHomeThatExists("jre/lib/rt.jar", "../Classes/classes.jar", jdkHome = File(property("JDK_16") as String)))) shadows(project(":kotlin-reflect-api")) @@ -146,6 +147,7 @@ val proguard by task { outputs.file(proguardOutput) injars(mapOf("filter" to "!META-INF/versions/**"), stripMetadata.outputs.files) + injars(mapOf("filter" to "!META-INF/**"), proguardAdditionalInJars) outjars(proguardOutput) libraryjars(mapOf("filter" to "!META-INF/versions/**"), proguardDeps)