앱 키 설정 및 버전업 처리

This commit is contained in:
JiWoong Sul
2025-11-17 19:28:33 +09:00
parent b018e5eb2f
commit d9435bbee5
5 changed files with 121 additions and 4 deletions

View File

@@ -1,3 +1,6 @@
import java.util.Properties
import java.io.FileInputStream
plugins {
id("com.android.application")
id("kotlin-android")
@@ -5,6 +8,13 @@ plugins {
id("dev.flutter.flutter-gradle-plugin")
}
val keystorePropertiesFile = rootProject.file("key.properties")
val keystoreProperties = Properties().apply {
if (keystorePropertiesFile.exists()) {
load(FileInputStream(keystorePropertiesFile))
}
}
android {
namespace = "com.naturebridgeai.digitalrentmanager"
compileSdk = flutter.compileSdkVersion
@@ -31,11 +41,22 @@ android {
versionName = flutter.versionName
}
signingConfigs {
if (keystoreProperties.isNotEmpty()) {
create("release") {
storeFile = file(keystoreProperties["storeFile"] as String)
storePassword = keystoreProperties["storePassword"] as String
keyAlias = keystoreProperties["keyAlias"] as String
keyPassword = keystoreProperties["keyPassword"] as String
}
}
}
buildTypes {
release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig = signingConfigs.getByName("debug")
if (signingConfigs.findByName("release") != null) {
signingConfig = signingConfigs.getByName("release")
}
}
}
}