Last active
December 23, 2017 14:47
-
-
Save babedev/ae73fc2d034e1eed6ddd63d37cc0f764 to your computer and use it in GitHub Desktop.
Use getIPAddress()
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
buildTypes { | |
local { | |
buildConfigField("String", "API_URL", "\"http://${getIPAddress()}:5000/api/v1\"") | |
} | |
debug { | |
buildConfigField("String", "API_URL", "\"http://my.staging.server/api/v1\"") | |
} | |
release { | |
buildConfigField("String", "API_URL", "\"http://my.prod.server/api/v1\"") | |
minifyEnabled false | |
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment