gradle-buildconfig-plugin icon indicating copy to clipboard operation
gradle-buildconfig-plugin copied to clipboard

Setting values to null

Open ghost opened this issue 7 years ago • 0 comments

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

ghost avatar May 02 '17 14:05 ghost