Closed prituladima closed 6 years ago
If I understand you correctly you can try and apply the plugin conditionally
if (condition) {
apply plugin: 'io.michaelrocks.paranoid'
}
no, in this case we need to remove all @Obfuscate annotations.
Project can't be compiled without this
You can add the required runtime dependency to the project manually:
dependencies {
implementation "io.michaelrocks:paranoid-core:0.1.7"
}
It worked for my project. Thank you!!! I advice you to add this in description.
@prituladima Great! OK, I'll do that.
my properties:
obfuscate.strings.release = true
obfuscate.classes.release = true
my app.gradle:
buildTypes {
release {
if (Boolean.parseBoolean(obfuscationProperties['obfuscate.strings.release'])) apply plugin: 'io.michaelrocks.paranoid'
shrinkResources false
minifyEnabled Boolean.parseBoolean(obfuscationProperties['obfuscate.classes.release'])
proguardFiles fileTree(dir: "proguard", include: ["*.pro"]).asList().toArray()
proguardFile getDefaultProguardFile('proguard-android.txt')
signingConfig signingConfigs.release
}
}
Can we do trigger in gradle to turn on and off string obfuscation?