Skip to content

Commit

Permalink
[feat] signingConfig 설정 추가, proguard rule 추가
Browse files Browse the repository at this point in the history
jks 파일, keystore 파일 공유 필요
  • Loading branch information
easyhooon committed Sep 25, 2024
1 parent 1eea2ff commit 94660d6
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 0 deletions.
16 changes: 16 additions & 0 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
@file:Suppress("INLINE_FROM_HIGHER_PLATFORM")

import java.util.Properties

plugins {
alias(libs.plugins.tripmate.android.application)
alias(libs.plugins.tripmate.android.application.compose)
Expand All @@ -11,6 +13,18 @@ plugins {
android {
namespace = "com.tripmate.android"

signingConfigs {
create("release") {
val propertiesFile = rootProject.file("keystore.properties")
val properties = Properties()
properties.load(propertiesFile.inputStream())
storeFile = file(properties["STORE_FILE"] as String)
storePassword = properties["STORE_PASSWORD"] as String
keyAlias = properties["KEY_ALIAS"] as String
keyPassword = properties["KEY_PASSWORD"] as String
}
}

buildFeatures {
buildConfig = true
}
Expand All @@ -31,6 +45,8 @@ android {
}

getByName("release") {
signingConfig = signingConfigs.getByName("release")

isDebuggable = false
isMinifyEnabled = true
isShrinkResources = true
Expand Down
25 changes: 25 additions & 0 deletions feature/#/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}

# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile

# https://stackoverflow.com/questions/70037537/proguard-missing-classes-detected-while-running-r8-after-adding-package-names-in
-dontwarn java.lang.invoke.StringConcatFactory

25 changes: 25 additions & 0 deletions feature/personalization/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}

# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile

# https://stackoverflow.com/questions/70037537/proguard-missing-classes-detected-while-running-r8-after-adding-package-names-in
-dontwarn java.lang.invoke.StringConcatFactory

0 comments on commit 94660d6

Please # to comment.