diff --git a/test-app/app/build.gradle b/test-app/app/build.gradle index ec5aea981..fded0e47a 100644 --- a/test-app/app/build.gradle +++ b/test-app/app/build.gradle @@ -1154,7 +1154,7 @@ tasks.configureEach({ DefaultTask currentTask -> // // ensure buildMetadata is done before R8 to allow custom proguard from metadata if (currentTask =~ /minify.*WithR8/) { - buildMetadata.finalizedBy(currentTask) + // buildMetadata.finalizedBy(currentTask) } if (currentTask =~ /assemble.*Debug/ || currentTask =~ /assemble.*Release/) { currentTask.finalizedBy("validateAppIdMatch") diff --git a/test-app/runtime/build.gradle b/test-app/runtime/build.gradle index 64697a940..212407497 100644 --- a/test-app/runtime/build.gradle +++ b/test-app/runtime/build.gradle @@ -126,6 +126,8 @@ android { abiFilters 'x86', 'x86_64', 'armeabi-v7a', 'arm64-v8a' } } + + consumerProguardFiles 'consumer-rules.pro' } compileOptions { diff --git a/test-app/runtime/consumer-rules.pro b/test-app/runtime/consumer-rules.pro new file mode 100644 index 000000000..329ee7266 --- /dev/null +++ b/test-app/runtime/consumer-rules.pro @@ -0,0 +1,11 @@ +# Keep all runtime classes +-keep class com.tns.* { *; } + +# Keep SBG-generated classes +-keep class com.tns.gen.** { *; } + +# Keep internal support/runtime classes +-keep class com.tns.internal.** { *; } + +# Preserve annotation metadata so reflection sees them +-keepattributes RuntimeVisibleAnnotations \ No newline at end of file