Sign release build

This commit is contained in:
Joscha 2025-01-25 16:27:21 +01:00
parent 88b0da62e4
commit e8059d2fbd
2 changed files with 15 additions and 0 deletions

View file

@ -1,6 +1,7 @@
.gradle/ .gradle/
build/ build/
/key.properties
/local.properties /local.properties
/tauri.settings.gradle /tauri.settings.gradle

View file

@ -1,3 +1,4 @@
import java.io.FileInputStream
import java.util.Properties import java.util.Properties
plugins { plugins {
@ -24,6 +25,18 @@ android {
versionCode = tauriProperties.getProperty("tauri.android.versionCode", "1").toInt() versionCode = tauriProperties.getProperty("tauri.android.versionCode", "1").toInt()
versionName = tauriProperties.getProperty("tauri.android.versionName", "1.0") versionName = tauriProperties.getProperty("tauri.android.versionName", "1.0")
} }
signingConfigs {
create("release") {
val keystorePropertiesFile = rootProject.file("key.properties")
val keystoreProperties = Properties()
keystoreProperties.load(FileInputStream(keystorePropertiesFile))
keyAlias = keystoreProperties["keyAlias"] as String
keyPassword = keystoreProperties["password"] as String
storeFile = file(keystoreProperties["storeFile"] as String)
storePassword = keystoreProperties["password"] as String
}
}
buildTypes { buildTypes {
getByName("debug") { getByName("debug") {
applicationIdSuffix = ".debug" applicationIdSuffix = ".debug"
@ -39,6 +52,7 @@ android {
} }
} }
getByName("release") { getByName("release") {
signingConfig = signingConfigs.getByName("release")
isMinifyEnabled = true isMinifyEnabled = true
proguardFiles( proguardFiles(
*fileTree(".") { include("**/*.pro") } *fileTree(".") { include("**/*.pro") }