Load a properties file in the build
Properties props = new Properties()
try {
props.load(file('file.properties').newDataInputStream())
} catch (Exception ex) {
throw new GradleException("Missing file.properties file.");
}
Configure a BuildConfig
constant from a property
buildTypes {
debug {
buildConfigField "String", "KEY", "\"${props.getProperty("key")}\""
}
release {}
}
Get system property
System.env.PROP_KEY