adwiv / android-fat-aar

Gradle script that allows you to merge and embed dependencies in generted aar file
The Unlicense
1.46k stars 435 forks source link

Proguard obfuscation of 3rd party aar #72

Closed akrupczynski closed 7 years ago

akrupczynski commented 7 years ago

I'm building an .aar and have included some 3rd party .aar as a separate module with:

embedded project(':other-aar')

Now I'd like to apply proguard rules to the 'other-aar'. Unfortunately nothing seem to work. I've found this bit in fat-aar.gradle:

task embedProguard << { println "Running FAT-AAR Task :embedProguard:"

def proguardRelease = file("$bundle_release_dir/proguard.txt")
embeddedAarDirs.each { aarPath ->
    try {
        def proguardLibFile = file("$aarPath/proguard.txt")
        if (proguardLibFile.exists())
            proguardRelease.append(proguardLibFile.text)
    } catch (Exception e) {
        e.printStackTrace();
        throw e;
    }
}

}

and changed proguard.txt to my proguard file name but it didn't help. Any ideas?