When building an Android Library Project with Gradle, what's the correct way to exclude BuildConfig.class from the resulting .jar?
Solved with android.packageBuildConfig = false
which is deprecated according to http://tools.android.com/tech-docs/new-build-system
here is a way to exclude from AAR:
apply plugin: 'com.android.library'
afterEvaluate {
generateReleaseBuildConfig.enabled = false
}
here is the source from reddit
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With