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

Setting values to null #17

Open
ghost opened this issue May 2, 2017 · 0 comments
Open

Setting values to null #17

ghost opened this issue May 2, 2017 · 0 comments

Comments

@ghost
Copy link

ghost commented May 2, 2017

I am trying to set a particular string value to null. The concept is if a certain gradle property does not exist, then the value should be set to null.

buildConfigField 'String', 'deviceId', null

Every time I do that, BuildConfig.java displays it like this:

public static final String deviceId = "null";

This makes it tough to do null checking, I have to do a literal String null check

jfcameron added a commit to jfcameron/gradle-buildconfig-plugin that referenced this issue Jul 6, 2018
modified class writer string case to write null values without surrounding ""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants