mirror of
https://github.com/atsunatsu/Look4Sat.git
synced 2026-10-02 19:17:21 +00:00
Conditionally applies the BG7NTA signingConfig when keystore.properties exists (gitignored). CI signs via apksigner with GitHub Secrets, so this only affects local builds.
30 lines
934 B
Kotlin
30 lines
934 B
Kotlin
import java.util.Properties
|
|
|
|
plugins {
|
|
alias(libs.plugins.convention.applicationPlugin)
|
|
}
|
|
|
|
// Load signing config from keystore.properties (gitignored, never commit credentials)
|
|
val keystoreProperties = Properties().apply {
|
|
val propsFile = rootProject.file("keystore.properties")
|
|
if (propsFile.exists()) propsFile.inputStream().use { load(it) }
|
|
}
|
|
|
|
android {
|
|
signingConfigs {
|
|
if (keystoreProperties["storeFile"] != null) {
|
|
create("release") {
|
|
storeFile = rootProject.file(keystoreProperties["storeFile"] as String)
|
|
storePassword = keystoreProperties["storePassword"] as String
|
|
keyAlias = keystoreProperties["keyAlias"] as String
|
|
keyPassword = keystoreProperties["keyPassword"] as String
|
|
}
|
|
}
|
|
}
|
|
buildTypes {
|
|
release {
|
|
signingConfig = signingConfigs.findByName("release")
|
|
}
|
|
}
|
|
}
|