build.gradle - Boolean properties in gradle.properties file is read as string -


i new gradle. have boolean property in gradle.properties file. when tried access it, property set string. string property seemed evaluated true when string not null , not empty.

my gradle.properties looks

enablegradleapp=false 

and settings.gradle looks

if (enablegradleapp) { println 'enabled core' } 

the message 'enabled core' gets printed.

need please

i had same problem, converted boolean this:

if (enablegradleapp.toboolean()) {   .... } 

Comments