Skip to content

Commit 3ecd707

Browse files
authored
fix: proguard builds (#1887)
1 parent 688a97b commit 3ecd707

File tree

3 files changed

+14
-1
lines changed

3 files changed

+14
-1
lines changed

test-app/app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1154,7 +1154,7 @@ tasks.configureEach({ DefaultTask currentTask ->
11541154

11551155
// // ensure buildMetadata is done before R8 to allow custom proguard from metadata
11561156
if (currentTask =~ /minify.*WithR8/) {
1157-
buildMetadata.finalizedBy(currentTask)
1157+
// buildMetadata.finalizedBy(currentTask)
11581158
}
11591159
if (currentTask =~ /assemble.*Debug/ || currentTask =~ /assemble.*Release/) {
11601160
currentTask.finalizedBy("validateAppIdMatch")

test-app/runtime/build.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,8 @@ android {
126126
abiFilters 'x86', 'x86_64', 'armeabi-v7a', 'arm64-v8a'
127127
}
128128
}
129+
130+
consumerProguardFiles 'consumer-rules.pro'
129131
}
130132

131133
compileOptions {
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Keep all runtime classes
2+
-keep class com.tns.* { *; }
3+
4+
# Keep SBG-generated classes
5+
-keep class com.tns.gen.** { *; }
6+
7+
# Keep internal support/runtime classes
8+
-keep class com.tns.internal.** { *; }
9+
10+
# Preserve annotation metadata so reflection sees them
11+
-keepattributes RuntimeVisibleAnnotations

0 commit comments

Comments
 (0)