78 lines
2.4 KiB
Kotlin
78 lines
2.4 KiB
Kotlin
import java.util.Properties
|
|
|
|
plugins {
|
|
alias(libs.plugins.android.application)
|
|
alias(libs.plugins.kotlin.android)
|
|
alias(libs.plugins.kotlin.compose)
|
|
}
|
|
|
|
android {
|
|
namespace = "com.bllry.filedrop"
|
|
compileSdk = 36
|
|
|
|
defaultConfig {
|
|
applicationId = "com.bllry.filedrop"
|
|
minSdk = 26
|
|
targetSdk = 36
|
|
versionCode = 1
|
|
versionName = "1.0"
|
|
}
|
|
|
|
// Release signing is enabled only when keystore.properties is present (local
|
|
// release builds). F-Droid's build server has no such file, so it builds
|
|
// unsigned; F-Droid then verifies the developer-published APK reproduces.
|
|
// Signing via the Gradle build (not external apksigner) keeps the APK's zip
|
|
// layout identical to the unsigned build, which is required for apksigcopier.
|
|
val keystorePropsFile = rootProject.file("keystore.properties")
|
|
val releaseSigning = if (keystorePropsFile.exists()) {
|
|
val props = Properties()
|
|
keystorePropsFile.inputStream().use { props.load(it) }
|
|
signingConfigs.create("release") {
|
|
storeFile = rootProject.file(props.getProperty("storeFile"))
|
|
storePassword = props.getProperty("storePassword")
|
|
keyAlias = props.getProperty("keyAlias")
|
|
keyPassword = props.getProperty("keyPassword")
|
|
}
|
|
} else {
|
|
null
|
|
}
|
|
|
|
buildTypes {
|
|
release {
|
|
isMinifyEnabled = false
|
|
proguardFiles(
|
|
getDefaultProguardFile("proguard-android-optimize.txt"),
|
|
"proguard-rules.pro",
|
|
)
|
|
signingConfig = releaseSigning
|
|
}
|
|
}
|
|
|
|
compileOptions {
|
|
sourceCompatibility = JavaVersion.VERSION_21
|
|
targetCompatibility = JavaVersion.VERSION_21
|
|
}
|
|
|
|
kotlin {
|
|
jvmToolchain(21)
|
|
}
|
|
|
|
buildFeatures {
|
|
compose = true
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
implementation(libs.androidx.core.ktx)
|
|
implementation(libs.androidx.lifecycle.runtime.ktx)
|
|
implementation(libs.androidx.lifecycle.viewmodel.compose)
|
|
implementation(libs.androidx.activity.compose)
|
|
implementation(platform(libs.androidx.compose.bom))
|
|
implementation(libs.androidx.ui)
|
|
implementation(libs.androidx.ui.graphics)
|
|
implementation(libs.androidx.ui.tooling.preview)
|
|
implementation(libs.androidx.material3)
|
|
implementation(libs.androidx.datastore.preferences)
|
|
implementation(libs.okhttp)
|
|
debugImplementation(libs.androidx.ui.tooling)
|
|
}
|