From 89a9347fd1cf694729c30585e8810f73ca4ce170 Mon Sep 17 00:00:00 2001 From: Jung SeokJoon Date: Sun, 28 Jul 2024 08:41:26 +0900 Subject: [PATCH] add BaseUrl in local.properties --- core/network/build.gradle.kts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/core/network/build.gradle.kts b/core/network/build.gradle.kts index 003fbe4c..a5d4d0e4 100644 --- a/core/network/build.gradle.kts +++ b/core/network/build.gradle.kts @@ -1,3 +1,4 @@ +import com.android.build.gradle.internal.cxx.configure.gradleLocalProperties import org.jetbrains.kotlin.gradle.dsl.JvmTarget plugins { @@ -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"), @@ -57,4 +58,7 @@ dependencies { implementation(libs.hilt.android) implementation(project(":core:model")) -} \ No newline at end of file +} +fun getMissionMateBaseUrl(): String { + return gradleLocalProperties(rootDir, providers).getProperty("MISSION_MATE_BASE_URL") ?: "" +}