Reputation: 57206
When building an Android Library Project with Gradle, what's the correct way to exclude BuildConfig.class from the resulting .jar?
Upvotes: 5
Views: 2968
Reputation: 6656
here is a way to exclude from AAR:
apply plugin: 'com.android.library'
afterEvaluate {
generateReleaseBuildConfig.enabled = false
}
here is the source from reddit
Upvotes: 1
Reputation: 57206
Solved with android.packageBuildConfig = false
which is deprecated according to http://tools.android.com/tech-docs/new-build-system
Upvotes: 1