@@ -17,6 +17,8 @@ plugins {
1717 id ' de.fuerstenau.buildconfig' version ' 1.1.8'
1818}
1919
20+
21+
2022apply plugin : " idea"
2123apply plugin : " java"
2224apply plugin : " kotlin"
@@ -25,16 +27,33 @@ apply plugin: "com.google.protobuf"
2527apply plugin : " org.junit.platform.gradle.plugin"
2628
2729buildConfig {
30+ ext. environment = project. hasProperty(' env' ) &&
31+ env == ' production' ? ' prod' : ' dev'
32+
2833 clsName = ' BuildConfig'
2934 packageName = ' app'
35+
36+ // API.
37+ def apiBasePath = ' https://staging.eng.sourcerer.io/api/commit'
38+ if (ext. environment == ' prod' ) {
39+ apiBasePath = ' https://sourcerer.io/api/commit'
40+ }
41+ apiBasePath = project. hasProperty(' api' ) ? api : apiBasePath
42+
43+ buildConfigField ' String' , ' API_BASE_PATH' , apiBasePath
44+
45+ // Common.
46+ buildConfigField ' String' , ' PROFILE_URL' , ' https://sourcerer.io/'
47+
48+ // App version.
3049 buildConfigField ' int' , ' VERSION_CODE' , ' 1'
3150 buildConfigField ' String' , ' VERSION' , ' 0.0.1'
32- buildConfigField ' String' , ' PROFILE_URL' , ' https://sourcerer.io/'
33- buildConfigField ' String' , ' API_BASE_URL' ,
34- ' https://staging.eng.sourcerer.io/api/commit'
51+
52+ // Google Analytics.
3553 buildConfigField ' String' , ' GA_BASE_PATH' , ' http://www.google-analytics.com'
3654 buildConfigField ' String' , ' GA_TRACKING_ID' , ' UA-107129190-2'
3755 buildConfigField ' boolean' , ' IS_GA_ENABLED' , ' true'
56+
3857 buildConfig
3958}
4059
0 commit comments