diff --git a/.gitignore b/.gitignore index 91b3d4f18..64f81bd0f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,11 +1,10 @@ *.iml .gradle -/local.properties .DS_Store /build /captures .externalNativeBuild .cxx -local.properties +keystore.properties /.idea/ /buildSrc/build/ diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 31792a5c7..9b945dda3 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -1,6 +1,7 @@ @file:Suppress("UnstableApiUsage") -import com.android.build.gradle.internal.cxx.configure.gradleLocalProperties +import java.io.FileInputStream +import java.util.Properties @Suppress("DSL_SCOPE_VIOLATION") plugins { @@ -17,7 +18,11 @@ android { versionCode = 1 versionName = "1.0.0" - val naverMapApiId = gradleLocalProperties(rootDir).getProperty("naver_map_api_id") + val keystorePropertiesFile = rootProject.file("keystore.properties") + val keystoreProperties = Properties() + keystoreProperties.load(FileInputStream(keystorePropertiesFile)) + + val naverMapApiId = keystoreProperties.getProperty("naver_map_api_id") manifestPlaceholders["naver_map_api_id"] = naverMapApiId } diff --git a/data/data-remote/build.gradle.kts b/data/data-remote/build.gradle.kts index fed4774ee..d4af3983a 100644 --- a/data/data-remote/build.gradle.kts +++ b/data/data-remote/build.gradle.kts @@ -1,4 +1,7 @@ -import com.android.build.gradle.internal.cxx.configure.gradleLocalProperties +@file:Suppress("UnstableApiUsage") + +import java.io.FileInputStream +import java.util.Properties @Suppress("DSL_SCOPE_VIOLATION") plugins { @@ -10,8 +13,16 @@ plugins { android { namespace = "com.lighthouse.data.remote" + buildFeatures { + buildConfig = true + } + defaultConfig { - val kakaoSearchId = gradleLocalProperties(rootDir).getProperty("kakao_search_id") + val keystorePropertiesFile = rootProject.file("keystore.properties") + val keystoreProperties = Properties() + keystoreProperties.load(FileInputStream(keystorePropertiesFile)) + + val kakaoSearchId = keystoreProperties.getProperty("kakao_search_id") buildConfigField("String", "kakaoSearchId", kakaoSearchId) } } diff --git a/local.properties b/local.properties new file mode 100644 index 000000000..cb2595e1a --- /dev/null +++ b/local.properties @@ -0,0 +1,8 @@ +## This file must *NOT* be checked into Version Control Systems, +# as it contains information specific to your local configuration. +# +# Location of the SDK. This is only used by Gradle. +# For customization when using a Version Control System, please read the +# header note. +#Thu Feb 02 22:44:28 KST 2023 +sdk.dir=C\:\\Users\\Home\\AppData\\Local\\Android\\Sdk