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.
62 lines
1.6 KiB
Kotlin
62 lines
1.6 KiB
Kotlin
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
|
|
|
|
defaultConfig {
|
|
minSdk = 24
|
|
targetSdk = 37
|
|
|
|
applicationId = "com.livrets.androidApp"
|
|
versionCode = 1
|
|
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
|
|
}
|
|
}
|
|
|
|
kotlin {
|
|
compilerOptions { jvmTarget.set(JvmTarget.JVM_17) }
|
|
}
|
|
|
|
dependencies {
|
|
implementation(project(":sharedUI"))
|
|
implementation(libs.androidx.activityCompose)
|
|
implementation(libs.androidx.fragmentKtx)
|
|
implementation(libs.gms.games.v2)
|
|
implementation(libs.kotlinx.coroutines.play.services)
|
|
}
|