What Is The Default For Minifyenabled For Buildtype Not Explicitly Scripted?
Solution 1:
The default value for minifyEnabled
is false
for all build types, as @laalto answered.
However, currently (as of 2015-04-24), this is not true for multi-module projects, in which some modules (app included) are dependent on other modules. This is due to bug #52962 that causes build types to not propagate to libraries -- they're always built as RELEASE.
Suggestions to work around this bug or notifications of its fix are most welcome.
Solution 2:
What is the default for minifyEnabled for debug build?
The default value for minifyEnabled
is false
for all build types. Reference.
The problem, however, is that minify seems to be happening in non-release build (i.e. debug) as well!
How is this possible?
Your debug build gets proguard treatment possibly by some other definition somewhere, or an external build script you're using.
In your updated question, you have a library project and an app project that uses a minified library even for debug builds. That's a "feature". For a solution, consider the following also mentioned in the issue report:
Build all variants of the library project by adding the following to its build.gradle
:
android {
publishNonDefault true
}
In the app project, choose the build type specific dependency with
dependencies {
releaseCompileproject(path: ':theotherproject', configuration: 'release')
debugCompileproject(path: ':theotherproject', configuration: 'debug')
}
Post a Comment for "What Is The Default For Minifyenabled For Buildtype Not Explicitly Scripted?"