cargo-deb metadata produces a .deb with the binary, the packaged user unit variant, man page and example config; arm64 cross-builds as a static musl binary via an isolated rustup and rust-lld (recipe in README). Add MIT LICENSE for the package copyright.
75 lines
2.0 KiB
Kotlin
75 lines
2.0 KiB
Kotlin
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
|
import java.util.Properties
|
|
|
|
plugins {
|
|
id("com.android.application")
|
|
id("org.jetbrains.kotlin.android")
|
|
id("org.jetbrains.kotlin.plugin.compose")
|
|
}
|
|
|
|
// Release signing lives outside the repo: android/keystore.properties
|
|
// (gitignored) points at the keystore and holds its passwords.
|
|
val keystoreProps = Properties().apply {
|
|
val f = rootProject.file("keystore.properties")
|
|
if (f.exists()) f.inputStream().use { load(it) }
|
|
}
|
|
|
|
android {
|
|
namespace = "org.netz.btleproximity"
|
|
compileSdk = 36
|
|
|
|
base {
|
|
archivesName = "btle-proximity-beacon"
|
|
}
|
|
|
|
defaultConfig {
|
|
applicationId = "org.netz.btleproximity"
|
|
minSdk = 26
|
|
targetSdk = 36
|
|
versionCode = 1
|
|
versionName = "1.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")
|
|
}
|
|
}
|
|
}
|
|
|
|
buildTypes {
|
|
release {
|
|
isMinifyEnabled = false
|
|
if (keystoreProps.isNotEmpty()) {
|
|
signingConfig = signingConfigs.getByName("release")
|
|
}
|
|
}
|
|
}
|
|
|
|
compileOptions {
|
|
sourceCompatibility = JavaVersion.VERSION_17
|
|
targetCompatibility = JavaVersion.VERSION_17
|
|
}
|
|
buildFeatures {
|
|
compose = true
|
|
}
|
|
}
|
|
|
|
kotlin {
|
|
compilerOptions {
|
|
jvmTarget = JvmTarget.JVM_17
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
implementation(platform("androidx.compose:compose-bom:2026.06.01"))
|
|
implementation("androidx.activity:activity-compose:1.13.0")
|
|
implementation("androidx.compose.material3:material3")
|
|
implementation("androidx.compose.ui:ui")
|
|
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.11.0")
|
|
}
|