Skip to content

Commit adf4627

Browse files
authored
fix(core): adjust ProGuard rules (#6588)
1 parent 56fa900 commit adf4627

File tree

3 files changed

+23
-2
lines changed

3 files changed

+23
-2
lines changed

.changes/fix-proguard-rules.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"tauri": patch
3+
---
4+
5+
Fixes ProGuard rules.

core/tauri/mobile/android/proguard-rules.pro

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,21 @@
11
-keep class app.tauri.** {
22
@app.tauri.JniMethod public <methods>;
3+
native <methods>;
34
}
45

5-
-keep class app.tauri.JSArray,app.tauri.JSObject {
6+
-keep class app.tauri.plugin.JSArray {
67
public <init>(...);
78
}
89

10+
-keepclassmembers class org.json.JSONArray {
11+
public put(...);
12+
}
13+
14+
-keep class app.tauri.plugin.JSObject {
15+
public <init>(...);
16+
public put(...);
17+
}
18+
919
-keep @app.tauri.annotation.TauriPlugin public class * {
1020
@app.tauri.annotation.Command public <methods>;
1121
@app.tauri.annotation.PermissionCallback <methods>;

core/tauri/mobile/proguard-tauri.pro

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
22

3-
-keep class $PACKAGE.TauriActivity {
3+
-keep class $PACKAGE.* {
4+
native <methods>;
5+
}
6+
7+
-keepclassmembers class $PACKAGE.TauriActivity {
48
getAppClass(...);
59
getVersion();
610
}
@@ -22,3 +26,5 @@
2226
-keep class $PACKAGE.MainActivity {
2327
public getPluginManager();
2428
}
29+
30+
-keep class androidx.appcompat.app.AppCompatActivity { }

0 commit comments

Comments
 (0)