diff --git a/core/reflection.jvm/resources/META-INF/com.android.tools/proguard/kotlin-reflect.pro b/core/reflection.jvm/resources/META-INF/com.android.tools/proguard/kotlin-reflect.pro new file mode 100644 index 00000000000..d82eae8518c --- /dev/null +++ b/core/reflection.jvm/resources/META-INF/com.android.tools/proguard/kotlin-reflect.pro @@ -0,0 +1,21 @@ +# When editing this file, update the following files as well: +# - META-INF/com.android.tools/r8-from-1.6.0/kotlin-reflect.pro +# - META-INF/com.android.tools/r8-upto-1.6.0/kotlin-reflect.pro +# - META-INF/proguard/kotlin-reflect.pro +# Keep Metadata annotations so they can be parsed at runtime. +-keep class kotlin.Metadata { *; } + +# Keep implementations of service loaded interfaces +-keep interface kotlin.reflect.jvm.internal.impl.builtins.BuiltInsLoader +-keep class * implements kotlin.reflect.jvm.internal.impl.builtins.BuiltInsLoader { public protected *; } +-keep interface kotlin.reflect.jvm.internal.impl.resolve.ExternalOverridabilityCondition +-keep class * implements kotlin.reflect.jvm.internal.impl.resolve.ExternalOverridabilityCondition { public protected *; } + +# Keep generic signatures and annotations at runtime. +-keepattributes Signature,RuntimeVisible*Annotations + +# Don't note on API calls from different JVM versions as they're gated properly at runtime. +-dontnote kotlin.internal.PlatformImplementationsKt + +# Don't note on internal APIs, as there is some class relocating that shrinkers may unnecessarily find suspicious. +-dontwarn kotlin.reflect.jvm.internal.** \ No newline at end of file diff --git a/core/reflection.jvm/resources/META-INF/com.android.tools/r8-from-1.6.0/kotlin-reflect.pro b/core/reflection.jvm/resources/META-INF/com.android.tools/r8-from-1.6.0/kotlin-reflect.pro new file mode 100644 index 00000000000..1958c717df6 --- /dev/null +++ b/core/reflection.jvm/resources/META-INF/com.android.tools/r8-from-1.6.0/kotlin-reflect.pro @@ -0,0 +1,16 @@ +# When editing this file, update the following files as well: +# - META-INF/com.android.tools/proguard/kotlin-reflect.pro +# - META-INF/com.android.tools/r8-upto-1.6.0/kotlin-reflect.pro +# - META-INF/proguard/kotlin-reflect.pro +# Keep Metadata annotations so they can be parsed at runtime. +-keep class kotlin.Metadata { *; } + +# Keep generic signatures and annotations at runtime. +# R8 requires InnerClasses and EnclosingMethod if you keepattributes Signature. +-keepattributes InnerClasses,Signature,RuntimeVisible*Annotations,EnclosingMethod + +# Don't note on API calls from different JVM versions as they're gated properly at runtime. +-dontnote kotlin.internal.PlatformImplementationsKt + +# Don't note on internal APIs, as there is some class relocating that shrinkers may unnecessarily find suspicious. +-dontwarn kotlin.reflect.jvm.internal.** \ No newline at end of file diff --git a/core/reflection.jvm/resources/META-INF/com.android.tools/r8-upto-1.6.0/kotlin-reflect.pro b/core/reflection.jvm/resources/META-INF/com.android.tools/r8-upto-1.6.0/kotlin-reflect.pro new file mode 100644 index 00000000000..ff4886b5b5c --- /dev/null +++ b/core/reflection.jvm/resources/META-INF/com.android.tools/r8-upto-1.6.0/kotlin-reflect.pro @@ -0,0 +1,23 @@ +# When editing this file, update the following files as well: +# - META-INF/com.android.tools/proguard/kotlin-reflect.pro +# - META-INF/com.android.tools/r8-from-1.6.0/kotlin-reflect.pro +# - META-INF/proguard/kotlin-reflect.pro +# Keep Metadata annotations so they can be parsed at runtime. +-keep class kotlin.Metadata { *; } + +# Keep implementations of service loaded interfaces +# R8 will automatically handle these these in 1.6+ +-keep interface kotlin.reflect.jvm.internal.impl.builtins.BuiltInsLoader +-keep class * implements kotlin.reflect.jvm.internal.impl.builtins.BuiltInsLoader { public protected *; } +-keep interface kotlin.reflect.jvm.internal.impl.resolve.ExternalOverridabilityCondition +-keep class * implements kotlin.reflect.jvm.internal.impl.resolve.ExternalOverridabilityCondition { public protected *; } + +# Keep generic signatures and annotations at runtime. +# R8 requires InnerClasses and EnclosingMethod if you keepattributes Signature. +-keepattributes InnerClasses,Signature,RuntimeVisible*Annotations,EnclosingMethod + +# Don't note on API calls from different JVM versions as they're gated properly at runtime. +-dontnote kotlin.internal.PlatformImplementationsKt + +# Don't note on internal APIs, as there is some class relocating that shrinkers may unnecessarily find suspicious. +-dontwarn kotlin.reflect.jvm.internal.** \ No newline at end of file diff --git a/core/reflection.jvm/resources/META-INF/proguard/kotlin-reflect.pro b/core/reflection.jvm/resources/META-INF/proguard/kotlin-reflect.pro new file mode 100644 index 00000000000..831b237faac --- /dev/null +++ b/core/reflection.jvm/resources/META-INF/proguard/kotlin-reflect.pro @@ -0,0 +1,23 @@ +# When editing this file, update the following files as well: +# - META-INF/com.android.tools/proguard/kotlin-reflect.pro +# - META-INF/com.android.tools/r8-from-1.6.0/kotlin-reflect.pro +# - META-INF/com.android.tools/r8-upto-1.6.0/kotlin-reflect.pro +# Keep Metadata annotations so they can be parsed at runtime. +-keep class kotlin.Metadata { *; } + +# Keep implementations of service loaded interfaces +# R8 will automatically handle these these in 1.6+ +-keep interface kotlin.reflect.jvm.internal.impl.builtins.BuiltInsLoader +-keep class * implements kotlin.reflect.jvm.internal.impl.builtins.BuiltInsLoader { public protected *; } +-keep interface kotlin.reflect.jvm.internal.impl.resolve.ExternalOverridabilityCondition +-keep class * implements kotlin.reflect.jvm.internal.impl.resolve.ExternalOverridabilityCondition { public protected *; } + +# Keep generic signatures and annotations at runtime. +# R8 requires InnerClasses and EnclosingMethod if you keepattributes Signature. +-keepattributes InnerClasses,Signature,RuntimeVisible*Annotations,EnclosingMethod + +# Don't note on API calls from different JVM versions as they're gated properly at runtime. +-dontnote kotlin.internal.PlatformImplementationsKt + +# Don't note on internal APIs, as there is some class relocating that shrinkers may unnecessarily find suspicious. +-dontwarn kotlin.reflect.jvm.internal.** \ No newline at end of file diff --git a/libraries/reflect/api/build.gradle b/libraries/reflect/api/build.gradle index cdaaa1fca8c..f19789fd0c1 100644 --- a/libraries/reflect/api/build.gradle +++ b/libraries/reflect/api/build.gradle @@ -11,6 +11,9 @@ sourceSets { java { srcDir "${rootDir}/core/reflection.jvm/src" } + resources { + srcDir("${rootDir}/core/reflection.jvm/resources") + } } if (includeJava9) {