1
Add the 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.4'
                ...
        }
    }
                                
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 (Do not share)
       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.
    }
                                
Generate your config file and you're all set!
Executions Toggle all
Exclude / Include