Why: the module was written but never compiled, so nothing about it was proved. Building it found a name clash and a theme that would have crashed every device below Android 10. What: - KeepOrgProvider.requireContext -> ctx(): ContentProvider gained requireContext() in API 30, and Kotlin refused the silent hiding. - The application theme was @android:style/Theme.DeviceDefault.DayNight, which is API 29 while minSdk is 26. Replaced with @style/AppTheme, plain DeviceDefault in values/ and DayNight in values-v29/. - Backup exclusions: data_extraction_rules.xml and backup_rules.xml exclude every domain for both cloud backup and device transfer. The session token authenticates as the user and the mirrored files are the organization's password databases; neither belongs in a backup. - User-facing strings moved from code into strings.xml, so the app is translatable. Layouts stay in code, as before. - mipmap-anydpi-v26 -> mipmap-anydpi (the qualifier is redundant at minSdk 26), and the redundant activity label is gone. - Lint is configured to write a text report, and `make android-lint` runs it; `make android` now fails with a clear message when ANDROID_HOME has no SDK. Proved: the unsigned release APK builds (656 KB), lint reports "No issues found", and the packaged DEX contains all 16 classes including every manifest component. Toolchain used: JDK 21, Gradle 8.10.2, SDK platform 35 and build-tools 35.0.0; on this arm64 host Google's x86-64 aapt2 runs under qemu-user-static with amd64 multiarch libraries, which android/README.md now documents. The app has still not run on a device: there is none here.
49 lines
1.4 KiB
Kotlin
49 lines
1.4 KiB
Kotlin
plugins {
|
|
id("com.android.application")
|
|
id("org.jetbrains.kotlin.android")
|
|
}
|
|
|
|
// Version comes from versions.mk through the Makefile:
|
|
// ./gradlew assembleRelease -PversionName=0.1.0 -PversionCode=1
|
|
val appVersionName = (project.findProperty("versionName") as String?) ?: "0.0.0"
|
|
val appVersionCode = ((project.findProperty("versionCode") as String?) ?: "1").toInt()
|
|
|
|
android {
|
|
namespace = "cc.tiredsysadmin.android.keeporg"
|
|
compileSdk = 35
|
|
|
|
defaultConfig {
|
|
applicationId = "cc.tiredsysadmin.android.keeporg"
|
|
minSdk = 26
|
|
targetSdk = 35
|
|
versionCode = appVersionCode
|
|
versionName = appVersionName
|
|
}
|
|
|
|
buildTypes {
|
|
release {
|
|
isMinifyEnabled = false
|
|
// Unsigned on purpose: the private F-Droid repository signs it.
|
|
signingConfig = null
|
|
}
|
|
}
|
|
compileOptions {
|
|
sourceCompatibility = JavaVersion.VERSION_17
|
|
targetCompatibility = JavaVersion.VERSION_17
|
|
}
|
|
kotlinOptions {
|
|
jvmTarget = "17"
|
|
}
|
|
lint {
|
|
// A lint finding is a defect until it is fixed or recorded here.
|
|
textReport = true
|
|
textOutput = file("build/reports/lint-results.txt")
|
|
}
|
|
dependenciesInfo {
|
|
// Keep the APK free of the Google dependency metadata blob so the
|
|
// build is reproducible for F-Droid.
|
|
includeInApk = false
|
|
includeInBundle = false
|
|
}
|
|
}
|