feat: configurer la signature release Android
Le build release lit androidApp/keystore.properties (gitigné) pour signer l'AAB ; sans ce fichier, il échoue volontairement. La keystore servira de clé d'upload Play : la section Publication du README documente la procédure et la nécessité de la sauvegarder.
This commit is contained in:
3 files changed
+42
No files matched your search
@@ -1,10 +1,16 @@
|
||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||
import java.util.Properties
|
||||
|
||||
plugins {
|
||||
alias(libs.plugins.compose.compiler)
|
||||
alias(libs.plugins.android.application)
|
||||
}
|
||||
|
||||
val keystoreProperties = Properties().apply {
|
||||
val f = file("keystore.properties")
|
||||
if (f.exists()) f.inputStream().use { load(it) }
|
||||
}
|
||||
|
||||
android {
|
||||
namespace = "com.livrets.androidApp"
|
||||
compileSdk = 37
|
||||
@@ -18,6 +24,24 @@ android {
|
||||
versionName = "1.0.0"
|
||||
}
|
||||
|
||||
signingConfigs {
|
||||
create("release") {
|
||||
if (keystoreProperties.isNotEmpty()) {
|
||||
storeFile = file(keystoreProperties["storeFile"] as String)
|
||||
storePassword = keystoreProperties["storePassword"] as String
|
||||
keyAlias = keystoreProperties["keyAlias"] as String
|
||||
keyPassword = keystoreProperties["keyPassword"] as String
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
isMinifyEnabled = false
|
||||
signingConfig = signingConfigs.getByName("release")
|
||||
}
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility = JavaVersion.VERSION_17
|
||||
targetCompatibility = JavaVersion.VERSION_17
|
||||
|
||||
Reference in new issue
Block a user