File tree Expand file tree Collapse file tree 3 files changed +27
-6
lines changed
src/main/java/com/yapp/core/data/remote/di Expand file tree Collapse file tree 3 files changed +27
-6
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,12 @@ android {
3232 getByName(" release" ) {
3333 signingConfig = signingConfigs.getByName(" release" )
3434 }
35+
36+ create(" qa" ) {
37+ initWith(getByName(" release" ))
38+ signingConfig = signingConfigs.getByName(" release" )
39+ matchingFallbacks + = listOf (" release" )
40+ }
3541 }
3642}
3743
Original file line number Diff line number Diff line change 11import com.yapp.app.setNamespace
22import org.gradle.internal.extensions.stdlib.capitalized
33import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
4+ import java.util.Properties
45
56plugins {
67 id(" yapp.android.library" )
@@ -14,6 +15,25 @@ android {
1415 buildFeatures {
1516 buildConfig = true
1617 }
18+
19+ buildTypes {
20+ val localProperties = Properties ()
21+ localProperties.load(
22+ project.rootProject.file(" local.properties" ).bufferedReader()
23+ )
24+
25+ getByName(" debug" ) {
26+ buildConfigField(" String" , " BASE_URL" , " \" ${localProperties[" base.url.debug" ]} \" " )
27+ }
28+ getByName(" release" ) {
29+ buildConfigField(" String" , " BASE_URL" , " \" ${localProperties[" base.url.release" ]} \" " )
30+ }
31+ create(" qa" ) {
32+ initWith(getByName(" release" ))
33+ matchingFallbacks + = listOf (" release" )
34+ buildConfigField(" String" , " BASE_URL" , " \" ${localProperties[" base.url.qa" ]} \" " )
35+ }
36+ }
1737}
1838
1939protobuf {
Original file line number Diff line number Diff line change @@ -26,12 +26,7 @@ import javax.inject.Singleton
2626@InstallIn(SingletonComponent ::class )
2727internal object NetworkModule {
2828
29- private val BASE_URL : String
30- get() = if (BuildConfig .DEBUG ) {
31- " https://dev-yappuworld.yapp.co.kr/"
32- } else {
33- " https://api-yappuworld.yapp.co.kr/"
34- }
29+ private const val BASE_URL : String = BuildConfig .BASE_URL
3530
3631 @Singleton
3732 @Provides
You can’t perform that action at this time.
0 commit comments