-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Ship consumer-rules.pro so JS bridge methods survive R8 (closes #1072) #1088
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: androidx
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| # Consumer Proguard/R8 rules for AgentWeb. | ||
| # | ||
| # Issue #1072: in release builds the JS bridge methods were stripped because | ||
| # the host app did not have a keep rule for @JavascriptInterface. AgentWeb | ||
| # itself uses reflection-style discovery on these methods, so the rule needs | ||
| # to apply to every consumer that ships the library. | ||
|
|
||
| -keepclassmembers class * { | ||
| @android.webkit.JavascriptInterface <methods>; | ||
| } | ||
|
Comment on lines
+8
to
+10
|
||
|
|
||
| # AgentWeb's own bridge plumbing relies on reflection over its public API. | ||
| -keep class com.just.agentweb.** { *; } | ||
| -dontwarn com.just.agentweb.** | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
testInstrumentationRunneris assigned twice; the second line overrides the first, which is confusing and makes the support runner line effectively dead. Consider removing the unused assignment to keepdefaultConfigunambiguous.