Skip to content

Commit

Permalink
add BaseUrl in local.properties
Browse files Browse the repository at this point in the history
  • Loading branch information
eshc123 committed Jul 27, 2024
1 parent d33cdb0 commit 89a9347
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions core/network/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import com.android.build.gradle.internal.cxx.configure.gradleLocalProperties
import org.jetbrains.kotlin.gradle.dsl.JvmTarget

plugins {
Expand All @@ -21,10 +22,10 @@ android {

buildTypes {
debug {
buildConfigField("String", "BASE_URL", "\"http://223.130.130.31:8080\"")
buildConfigField("String", "BASE_URL", getMissionMateBaseUrl())
}
release {
buildConfigField("String", "BASE_URL", "\"http://223.130.130.31:8080\"")
buildConfigField("String", "BASE_URL", getMissionMateBaseUrl())
isMinifyEnabled = false
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
Expand Down Expand Up @@ -57,4 +58,7 @@ dependencies {
implementation(libs.hilt.android)

implementation(project(":core:model"))
}
}
fun getMissionMateBaseUrl(): String {
return gradleLocalProperties(rootDir, providers).getProperty("MISSION_MATE_BASE_URL") ?: ""
}

0 comments on commit 89a9347

Please sign in to comment.