-
Notifications
You must be signed in to change notification settings - Fork 0
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
Stop keeping all androidx.**
classes in generated ProGuard rules
#7
Comments
Workaround for /**
* TODO: remove this once https://github.com/AppLovin/AppLovin-MAX-Ad-Review-SDK-Android/issues/7 is fixed.
*/
def removeProguardRules = tasks.register('removeProguardRules') {
def file = rootProject.file(".safedk/proguard-safedk.pro")
if (file.exists()) {
def newRules = file.readLines().findAll { !it.contains("androidx.**") }.join('\n')
file.text = newRules
}
}
tasks.withType(com.android.build.gradle.internal.tasks.R8Task).configureEach {
dependsOn(removeProguardRules)
} Workaround for def removeProguardRules = tasks.register('removeProguardRules') {
def file = rootProject.file(".safedk/proguard-safedk.pro")
if (file.exists()) {
def redundantRules = [
"-keep class androidx.** {",
"*** startActivityForResult(***);",
"*** startActivity(***);",
"}",
]
def newRules = file.readLines().collect { it.trim() }
newRules.removeAll(redundantRules)
file.text = newRules.join('\n')
}
} |
Goooler
changed the title
Stop keeping all
Stop keeping all Jul 10, 2024
androidx.**
classes in generated Proguard rulesandroidx.**
classes in generated ProGuard rules
This issue is stale because it has been open for 30 days with no activity. |
It's alive. |
This issue is stale because it has been open for 30 days with no activity. |
It's alive. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The ProGuard file generated by this plugin is located at
project_dir/.safedk/proguard-safedk.pro
, it looks like:contains
-keep class androidx.** { *; }
to keep all AndroidX classes, significantly increasing the generated APK file sizes. Usually, rules are bundled in AndroidX packages, we don't need to add any extra ones. Please remove it.The text was updated successfully, but these errors were encountered: