Files
internaluploader/android/app/build.gradle.kts

88 lines
2.9 KiB
Kotlin
Raw Normal View History

import java.util.Properties
plugins {
id("com.android.application")
id("org.jetbrains.kotlin.android")
id("com.google.devtools.ksp")
}
// Release signing is read from ~/.internaluploader/signing.properties so the
// keystore never enters the repo. Absent that file, release builds are simply
// unsigned (still useful for CI compile checks).
val signingProps = Properties().apply {
val f = file("${System.getProperty("user.home")}/.internaluploader/signing.properties")
if (f.exists()) f.inputStream().use { load(it) }
}
android {
namespace = "eu.itaz.internaluploader"
compileSdk = 36
defaultConfig {
applicationId = "eu.itaz.internaluploader"
minSdk = 26
targetSdk = 35
versionCode = 1
versionName = "1.0.0"
// The one place the server address exists. Never rendered in the UI;
// a pairing QR can carry a different origin and overrides this.
buildConfigField("String", "DEFAULT_SERVER_URL", "\"https://puploader.ad.itaz.eu\"")
}
signingConfigs {
if (signingProps.getProperty("storeFile") != null) {
create("release") {
storeFile = file(signingProps.getProperty("storeFile"))
storePassword = signingProps.getProperty("storePassword")
keyAlias = signingProps.getProperty("keyAlias")
keyPassword = signingProps.getProperty("keyPassword")
}
}
}
buildTypes {
release {
isMinifyEnabled = true
isShrinkResources = true
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
signingConfig = signingConfigs.findByName("release")
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = "17"
}
buildFeatures {
viewBinding = true
buildConfig = true
}
}
dependencies {
implementation("androidx.core:core-ktx:1.16.0")
implementation("androidx.appcompat:appcompat:1.7.1")
implementation("com.google.android.material:material:1.12.0")
implementation("androidx.constraintlayout:constraintlayout:2.2.1")
implementation("androidx.recyclerview:recyclerview:1.4.0")
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.9.1")
implementation("androidx.browser:browser:1.8.0")
implementation("androidx.security:security-crypto:1.1.0-alpha06")
implementation("androidx.work:work-runtime-ktx:2.10.1")
implementation("androidx.room:room-runtime:2.7.1")
implementation("androidx.room:room-ktx:2.7.1")
ksp("androidx.room:room-compiler:2.7.1")
implementation("com.squareup.okhttp3:okhttp:4.12.0")
implementation("com.journeyapps:zxing-android-embedded:4.3.0")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.10.2")
}