Files
indexipro/android/app/build.gradle.kts
T
juli 4fc578f3b5 In-app updates, versioned APK downloads and one-command releases
- App downloads updates itself, verifies SHA-256, opens the installer;
  manual Check for updates menu item
- Server publishes the checksum and serves /download/IndexiPro-<v>.apk
- android/release.sh tags v<version> and publishes IndexiPro-<version>.apk
  to the Gitea release, so F-Droid can track a versioned URL
- Bump app to 1.2.0 (versionCode 3)
2026-11-12 18:10:23 +01:00

77 lines
2.7 KiB
Kotlin

import java.util.Properties
plugins {
id("com.android.application")
id("org.jetbrains.kotlin.android")
id("org.jetbrains.kotlin.plugin.compose")
}
// Release signing comes from android/keystore.properties (not committed). Without it the
// release build falls back to the debug key so `assembleRelease` always works.
val keystoreProps = Properties().apply {
val f = rootProject.file("keystore.properties")
if (f.exists()) f.inputStream().use { load(it) }
}
android {
namespace = "online.bossers.indexipro"
compileSdk = 35
defaultConfig {
applicationId = "online.bossers.indexipro"
minSdk = 26
targetSdk = 35
versionCode = 3
versionName = "1.2.0"
}
signingConfigs {
if (keystoreProps.isNotEmpty()) {
create("release") {
storeFile = rootProject.file(keystoreProps.getProperty("storeFile"))
storePassword = keystoreProps.getProperty("storePassword")
keyAlias = keystoreProps.getProperty("keyAlias")
keyPassword = keystoreProps.getProperty("keyPassword")
}
}
}
buildFeatures {
compose = true
buildConfig = true
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
kotlinOptions { jvmTarget = "17" }
buildTypes {
release {
isMinifyEnabled = true
isShrinkResources = true
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
signingConfig = signingConfigs.findByName("release") ?: signingConfigs.getByName("debug")
}
}
}
dependencies {
val composeBom = platform("androidx.compose:compose-bom:2024.10.01")
implementation(composeBom)
implementation("androidx.activity:activity-compose:1.9.3")
implementation("androidx.compose.ui:ui")
implementation("androidx.compose.ui:ui-graphics")
implementation("androidx.compose.material3:material3")
implementation("androidx.compose.material:material-icons-extended:1.7.5")
implementation("androidx.lifecycle:lifecycle-viewmodel-compose:2.8.7")
implementation("androidx.lifecycle:lifecycle-runtime-compose:2.8.7")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.9.0")
implementation("io.coil-kt:coil-compose:2.7.0")
implementation("com.squareup.okhttp3:okhttp:4.12.0")
implementation("androidx.work:work-runtime-ktx:2.9.1")
implementation("androidx.exifinterface:exifinterface:1.3.7")
implementation("com.journeyapps:zxing-android-embedded:4.3.0")
implementation("com.google.zxing:core:3.5.3")
}