Files
PIKKIE/android/app/build.gradle.kts
T

84 lines
3.2 KiB
Kotlin

plugins {
id("com.android.application")
id("org.jetbrains.kotlin.android")
id("org.jetbrains.kotlin.plugin.compose")
}
android {
namespace = "nl.pikkie.app"
compileSdk = 35
defaultConfig {
applicationId = "nl.pikkie.app"
minSdk = 26
targetSdk = 35
versionCode = 9
versionName = "1.3.4"
}
signingConfigs {
// Set PIKKIE_KEYSTORE / PIKKIE_KEYSTORE_PASSWORD / PIKKIE_KEY_ALIAS / PIKKIE_KEY_PASSWORD to sign release builds.
create("release") {
val ks = System.getenv("PIKKIE_KEYSTORE")
if (ks != null) {
storeFile = file(ks)
storePassword = System.getenv("PIKKIE_KEYSTORE_PASSWORD")
keyAlias = System.getenv("PIKKIE_KEY_ALIAS")
keyPassword = System.getenv("PIKKIE_KEY_PASSWORD")
}
}
}
buildTypes {
// Debug builds install NEXT TO the real app (own package, own login), so testing never touches a real account.
debug {
applicationIdSuffix = ".dev"
versionNameSuffix = "-dev"
}
release {
isMinifyEnabled = true
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
if (System.getenv("PIKKIE_KEYSTORE") != null) signingConfig = signingConfigs.getByName("release")
// `./gradlew assembleRelease -PdevRelease`: the real, minified release code as the side-by-side dev app,
// signed with the debug key, to test release-only behaviour without touching a real install
if (project.hasProperty("devRelease")) {
applicationIdSuffix = ".dev"
versionNameSuffix = "-devrelease"
signingConfig = signingConfigs.getByName("debug")
}
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
kotlinOptions { jvmTarget = "17" }
buildFeatures {
compose = true
buildConfig = true
}
}
dependencies {
val composeBom = platform("androidx.compose:compose-bom:2024.10.01")
implementation(composeBom)
implementation("androidx.compose.ui:ui")
implementation("androidx.compose.material3:material3")
implementation("androidx.compose.material:material-icons-extended")
implementation("androidx.compose.ui:ui-tooling-preview")
debugImplementation("androidx.compose.ui:ui-tooling")
implementation("androidx.activity:activity-compose:1.9.3")
implementation("androidx.navigation:navigation-compose:2.8.4")
implementation("androidx.lifecycle:lifecycle-runtime-compose:2.8.7")
implementation("androidx.core:core-ktx:1.15.0")
implementation("com.squareup.okhttp3:okhttp:4.12.0")
// QR scanning without Google Play services
val camerax = "1.4.0"
implementation("androidx.camera:camera-camera2:$camerax")
implementation("androidx.camera:camera-lifecycle:$camerax")
implementation("androidx.camera:camera-view:$camerax")
implementation("com.google.zxing:core:3.5.3")
implementation("androidx.work:work-runtime-ktx:2.10.0")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.9.0")
}