You've already forked KsuWebUIStandalone
mirror of
https://github.com/5ec1cff/KsuWebUIStandalone.git
synced 2025-09-06 06:37:11 +00:00
add release signing config
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -9,3 +9,4 @@
|
|||||||
.cxx
|
.cxx
|
||||||
local.properties
|
local.properties
|
||||||
/.kotlin
|
/.kotlin
|
||||||
|
keystore.properties
|
||||||
|
|||||||
@@ -1,12 +1,33 @@
|
|||||||
|
import java.io.FileInputStream
|
||||||
|
import java.util.Properties
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
alias(libs.plugins.android.application)
|
alias(libs.plugins.android.application)
|
||||||
alias(libs.plugins.jetbrains.kotlin.android)
|
alias(libs.plugins.jetbrains.kotlin.android)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
val keystorePropertiesFile: File = rootProject.file("keystore.properties")
|
||||||
|
val keystoreProperties = if (keystorePropertiesFile.exists() && keystorePropertiesFile.isFile) {
|
||||||
|
Properties().apply {
|
||||||
|
load(FileInputStream(keystorePropertiesFile))
|
||||||
|
}
|
||||||
|
} else null
|
||||||
|
|
||||||
android {
|
android {
|
||||||
namespace = "io.github.a13e300.ksuwebui"
|
namespace = "io.github.a13e300.ksuwebui"
|
||||||
compileSdk = 35
|
compileSdk = 35
|
||||||
|
|
||||||
|
signingConfigs {
|
||||||
|
if (keystoreProperties != null) {
|
||||||
|
create("release") {
|
||||||
|
keyAlias = keystoreProperties["keyAlias"] as String
|
||||||
|
keyPassword = keystoreProperties["keyPassword"] as String
|
||||||
|
storeFile = file(keystoreProperties["storeFile"] as String)
|
||||||
|
storePassword = keystoreProperties["storePassword"] as String
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId = "io.github.a13e300.ksuwebui"
|
applicationId = "io.github.a13e300.ksuwebui"
|
||||||
minSdk = 26
|
minSdk = 26
|
||||||
@@ -24,7 +45,11 @@ android {
|
|||||||
getDefaultProguardFile("proguard-android-optimize.txt"),
|
getDefaultProguardFile("proguard-android-optimize.txt"),
|
||||||
"proguard-rules.pro"
|
"proguard-rules.pro"
|
||||||
)
|
)
|
||||||
signingConfig = signingConfigs["debug"]
|
val releaseSig = signingConfigs.findByName("release")
|
||||||
|
signingConfig = if (releaseSig != null) releaseSig else {
|
||||||
|
println("use debug signing config")
|
||||||
|
signingConfigs["debug"]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
compileOptions {
|
compileOptions {
|
||||||
|
|||||||
Reference in New Issue
Block a user