WARNING: Android support is currently still under development and in an experimental phase.
Please report bugs to support.
This feature is premium only.
Setup
1
Add plugin dependency to your app build.gradle:
buildscript {
repositories {
maven { url = "https://branchlock.net/android/" }
...
}
dependencies {
classpath group: 'net.branchlock',
name: 'obfuscation',
version: '1.1.2'
...
}
}
2
Apply and configure the plugin in your app build.gradle:
/* do not place this inside the plugins block */
apply plugin: net.branchlock.obfuscation.ObfuscationPlugin
branchlock {
configFile = 'branchlock.json' // the path to your branchlock config json file
apiKey = 'YOUR_API_KEY' // your API key
uploadLibs = true // needs to be enabled if class not found errors appear
obfuscateDebug = false // also obfuscate non-release testing versions. can be used to test if obfuscation is working
excludeLib 'com.google.android.gms', 'com.google.ads' // exclude classes that start with your string from being uploaded as library to save time
fullLibCode = false // shrinks libraries by default before uploading to save time. Needs to be enabled if you do not want to shrink your libraries.
}