I've updated my build.gradle file to include gradle-build-properties-plugin. Then I tried to load some secrets into my debug buildType and got this message:
buildscript {
repositories {
jcenter()
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'io.fabric.tools:gradle:1.22.1'
classpath 'com.novoda:gradle-build-properties-plugin:0.3'
}
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
apply plugin: 'com.novoda.build-properties'
...
android {
...
buildProperties {
secrets {
file project.file('parameters.properties')
}
}
buildTypes {
debug {
buildConfigString "MY_SECRET_KEY", buildProperties.secrets['a_secret_key'].or(buildProperties.env['MY_SECRET_KEY'])
}
}
...