11@file:Suppress(" INLINE_FROM_HIGHER_PLATFORM" )
22
33import com.android.build.gradle.internal.cxx.configure.gradleLocalProperties
4+ import java.util.Properties
45
56plugins {
67 alias(libs.plugins.booket.android.application)
@@ -11,21 +12,47 @@ plugins {
1112android {
1213 namespace = " com.ninecraft.booket"
1314
14- defaultConfig {
15- buildConfigField(" String" , " KAKAO_NATIVE_APP_KEY" , getApiKey(" KAKAO_NATIVE_APP_KEY" ))
16- manifestPlaceholders[" KAKAO_NATIVE_APP_KEY" ] = getApiKey(" KAKAO_NATIVE_APP_KEY" ).trim(' "' )
15+ signingConfigs {
16+ create(" release" ) {
17+ val propertiesFile = rootProject.file(" keystore.properties" )
18+ val properties = Properties ()
19+ properties.load(propertiesFile.inputStream())
20+ storeFile = file(properties[" STORE_FILE" ] as String )
21+ storePassword = properties[" STORE_PASSWORD" ] as String
22+ keyAlias = properties[" KEY_ALIAS" ] as String
23+ keyPassword = properties[" KEY_PASSWORD" ] as String
24+ }
1725 }
1826
1927 buildTypes {
20- release {
21- isMinifyEnabled = false
28+ getByName(" debug" ) {
29+ isDebuggable = true
30+ applicationIdSuffix = " .dev"
31+ manifestPlaceholders + = mapOf (
32+ " appName" to " @string/app_name_dev" ,
33+ )
34+ }
35+
36+ getByName(" release" ) {
37+ isDebuggable = false
38+ isMinifyEnabled = true
39+ isShrinkResources = true
40+ signingConfig = signingConfigs.getByName(" release" )
41+ manifestPlaceholders + = mapOf (
42+ " appName" to " @string/app_name" ,
43+ )
2244 proguardFiles(
2345 getDefaultProguardFile(" proguard-android-optimize.txt" ),
2446 " proguard-rules.pro" ,
2547 )
2648 }
2749 }
2850
51+ defaultConfig {
52+ buildConfigField(" String" , " KAKAO_NATIVE_APP_KEY" , getApiKey(" KAKAO_NATIVE_APP_KEY" ))
53+ manifestPlaceholders[" KAKAO_NATIVE_APP_KEY" ] = getApiKey(" KAKAO_NATIVE_APP_KEY" ).trim(' "' )
54+ }
55+
2956 buildFeatures {
3057 buildConfig = true
3158 }
0 commit comments