@@ -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,15 +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 ' , ' http://localhost:3181 '
51+
52+ // Google Analytics.
3453 buildConfigField ' String' , ' GA_BASE_PATH' , ' http://www.google-analytics.com'
3554 buildConfigField ' String' , ' GA_TRACKING_ID' , ' UA-107129190-2'
3655 buildConfigField ' boolean' , ' IS_GA_ENABLED' , ' true'
56+
3757 buildConfig
3858}
3959
98118 exclude " META-INF/*.DSA"
99119 exclude " META-INF/*.RSA"
100120 }
121+
122+ baseName ' sourcerer-app'
101123}
0 commit comments