Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BuildConfig.DEBUG is Boolean.parseBoolean("true") with release build type #180

Open
funyoung opened this issue Jun 1, 2016 · 3 comments
Assignees
Milestone

Comments

@funyoung
Copy link

funyoung commented Jun 1, 2016

With Android Studio, build the project and found DEBUG is Boolean.parseBoolean("true"), which might be Boolean.parseBoolean("false").

@artem-zinnatullin
Copy link
Owner

Hm, maybe you've switched build type and didn't sync gradle in Android
Studio? BuildConfig should be regenerated from scratch, I don't remember
putting "debuggable true" for release build type.

On Wed, Jun 1, 2016 at 10:12 AM, Yang Feng [email protected] wrote:

With Android Studio, build the project and found DEBUG is
Boolean.parseBoolean("true"), which might be Boolean.parseBoolean("false").


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#180, or mute
the thread
https://github.com/notifications/unsubscribe/AA7B3H0QMyPOQGLw-AbK41p1v21dwuM0ks5qHTDCgaJpZM4IrQDT
.

@funyoung
Copy link
Author

funyoung commented Jun 3, 2016

You are right, BuildConfig is regenerated from scratch, and my Android Studio has sync after the build type switching. With some investigation, I found what make the magic change to make BuildConfig.DEBUG is always 'true' is bellowing line within the app/build.gradle in the 'release' section of buildTypes config:

testCoverageEnabled true

removing this line and the BuildConfig.java seems correct and DEBUG = false for release build.

then I add the line back, BuildConfig.DEBUG = Boolean.parseBoolean("true");

Would like to double check and apply the patch if it is fine.

@artem-zinnatullin
Copy link
Owner

Huh, makes sense, lemme check on my side then!

On Fri, 3 Jun 2016, 12:13 Yang Feng, [email protected] wrote:

You are right, BuildConfig is regenerated from scratch, and my Android
Studio has sync after the build type switching. With some investigation, I
found what make the magic change to make BuildConfig.DEBUG is always 'true'
is bellowing line within the app/build.gradle in the 'release' section of
buildTypes config:

testCoverageEnabled true

removing this line and the BuildConfig.java seems correct and DEBUG =
false for release build.

then I add the line back, BuildConfig.DEBUG = Boolean.parseBoolean("true");

Would like to double check and apply the patch if it is fine.


You are receiving this because you commented.

Reply to this email directly, view it on GitHub
#180 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AA7B3Oh0M2xxNwR1QhstJ8GrzDTmEwUFks5qH_BFgaJpZM4IrQDT
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants