shwenzhang / AndResGuard

proguard resource for Android by wechat team
Apache License 2.0
8.54k stars 1.54k forks source link

Optimize Resource Whitelist #58

Closed simpleton closed 8 years ago

simpleton commented 8 years ago

Read 'applicationId' from variant

openproject commented 8 years ago

You can get packageName by applicationId:

andResGuard {
    def packageName = android.defaultConfig.applicationId
    whiteList = [
            packageName + ".R.drawable.icon"
    ]
}
openproject commented 8 years ago

the defaultConfig is not always right, it need better solutions!

simpleton commented 8 years ago

fixed in 1.1.8 release