Skip to content

Commit a85b46d

Browse files
authored
remove unnecessary debug key creation and update kotlinxSerializationJson to 1.11.0 (#184)
1 parent ba39547 commit a85b46d

2 files changed

Lines changed: 9 additions & 34 deletions

File tree

app/build.gradle.kts

Lines changed: 6 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -27,41 +27,16 @@ android {
2727
}
2828

2929
signingConfigs {
30-
create("custom-key") {
31-
val keystoreAlias = System.getenv("KEYSTORE_ALIAS") ?: ""
32-
val keystorePassword = System.getenv("KEYSTORE_PASSWORD") ?: ""
33-
val keystorePath = System.getenv("KEYSTORE_PATH") ?: ""
30+
val keystoreAlias = System.getenv("KEYSTORE_ALIAS") ?: ""
31+
val keystorePassword = System.getenv("KEYSTORE_PASSWORD") ?: ""
32+
val keystorePath = System.getenv("KEYSTORE_PATH") ?: ""
3433

35-
if (keystorePath.isNotEmpty() && file(keystorePath).exists() && file(keystorePath).length() > 0) {
34+
if (keystorePath.isNotEmpty() && file(keystorePath).exists() && file(keystorePath).length() > 0) {
35+
create("custom-key") {
3636
keyAlias = keystoreAlias
3737
keyPassword = keystorePassword
3838
storeFile = file(keystorePath)
3939
storePassword = keystorePassword
40-
} else {
41-
val debugKeystoreFile = file("${System.getProperty("user.home")}/debug.keystore")
42-
43-
println("⚠️ Custom keystore not found or empty! creating debug keystore.")
44-
45-
if (!debugKeystoreFile.exists()) {
46-
Runtime.getRuntime().exec(
47-
arrayOf(
48-
"keytool", "-genkeypair",
49-
"-v", "-keystore", debugKeystoreFile.absolutePath,
50-
"-storepass", "android",
51-
"-keypass", "android",
52-
"-alias", "androiddebugkey",
53-
"-keyalg", "RSA",
54-
"-keysize", "2048",
55-
"-validity", "10000",
56-
"-dname", "CN=Android Debug,O=Android,C=US"
57-
)
58-
).waitFor()
59-
}
60-
61-
keyAlias = "androiddebugkey"
62-
keyPassword = "android"
63-
storeFile = debugKeystoreFile
64-
storePassword = "android"
6540
}
6641
}
6742
}
@@ -74,7 +49,7 @@ android {
7449
getDefaultProguardFile("proguard-android-optimize.txt"),
7550
"proguard-rules.pro"
7651
)
77-
signingConfig = signingConfigs.getByName("custom-key") ?: signingConfigs.getByName("debug")
52+
signingConfig = signingConfigs.findByName("custom-key") ?: signingConfigs.getByName("debug")
7853
}
7954
}
8055

gradle/libs.versions.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ junit = "4.13.2"
99
junitVersion = "1.2.1"
1010
espressoCore = "3.6.1"
1111
appcompat = "1.7.1"
12-
kotlinxSerializationJson = "1.10.0"
12+
kotlinxSerializationJson = "1.11.0"
1313
squareupOkHttp3 = "5.3.2"
1414
material = "1.13.0"
1515
constraintlayout = "2.2.1"
1616
navigationCompose = "2.9.7"
1717
activity = "1.13.0"
18-
uiToolingPreviewAndroid = "1.7.8"
19-
uiTooling = "1.7.8"
18+
uiToolingPreviewAndroid = "1.10.6"
19+
uiTooling = "1.10.6"
2020
materialSwitch = "1.0.0"
2121

2222
[libraries]

0 commit comments

Comments
 (0)