4
How I can access the settings I provided via build config in my code?
source link: https://dev.to/pcmagas/how-i-can-access-the-settings-i-provided-via-build-config-in-my-code-18jb
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
How I can access the settings I provided via build config in my code?
Hello I have the following problem:
As seen in oficial android documentation I can use build variants and build my application via different settings.
Therefore, I made my own variants:
android {
defaultConfig {
manifestPlaceholders = [hostName:"www.example.com"]
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
debug {
applicationIdSuffix ".debug"
manifestPlaceholders = [hostName:"local.example.com"]
…
What I want is to access the settings from build.gradle
. Do you know how I can do this?
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK