Skip to content

Implementation

Efra Espada edited this page May 7, 2019 · 28 revisions

Add these lines in the build.gradle file located in your project's root-level:

buildscript {
    ext.stringcare_version = '1.5'
    repositories {
        jcenter()
    }
    dependencies {
        classpath "com.stringcare:plugin:$stringcare_version"
        classpath "com.android.tools.build:gradle:3.4.0"
    }
}

apply plugin: StringCare

stringcare {
    debug true    // debug logs
}

In any module where you want to work with obfuscated strings, edit the build.gradle file:

repositories {
    jcenter()
} 
 
dependencies {
    implementation "com.stringcare:library:$stringcare_version"
}

Setup in code

StringCare library needs the global application's context:

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    SC.init(getApplicationContext());
}

And that's all folks.

Clone this wiki locally