Add Debian packaging and arm64 cross build
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.
This commit is contained in:
1 parent
b4e51a58f6
commit
b93c0134dd
9 files changed
+189
-1
No files matched your search
@@ -7,3 +7,6 @@ local.properties
|
||||
.kotlin/
|
||||
captures/
|
||||
*.swp
|
||||
*.keystore
|
||||
*.jks
|
||||
keystore.properties
|
||||
@@ -32,6 +32,14 @@ cd android
|
||||
# -> app/build/outputs/apk/debug/app-debug.apk
|
||||
```
|
||||
|
||||
Release builds are signed when `keystore.properties` (gitignored, see
|
||||
`AGENTS.md`) exists; otherwise they come out unsigned:
|
||||
|
||||
```sh
|
||||
./gradlew assembleRelease
|
||||
# -> app/build/outputs/apk/release/btle-proximity-beacon-release.apk
|
||||
```
|
||||
|
||||
Install: `adb install app/build/outputs/apk/debug/app-debug.apk`, or copy
|
||||
the APK to the phone and open it.
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||
import java.util.Properties
|
||||
|
||||
plugins {
|
||||
id("com.android.application")
|
||||
@@ -6,10 +7,21 @@ plugins {
|
||||
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
|
||||
@@ -18,9 +30,23 @@ android {
|
||||
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")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user