Add Rust distribution auditing, pinned post-build AAB signing, complete offline third-party notices, an Android privacy policy and reviewable Play listing assets. Preserve the application ID and audit both ARM ABIs, native symbols, baseline profiles and R8 mapping. Fix dialog focus ownership, navigation-triggered cleanup loops and stale authentication errors after first-run setup, with native and real-activity regressions. Google Play publication is deferred by the user. Issue #112 remains open for production signing, Console declarations and actual Play install/update verification.
141 lines
5.0 KiB
Kotlin
141 lines
5.0 KiB
Kotlin
import groovy.json.JsonOutput
|
|
import java.util.Properties
|
|
import org.gradle.api.artifacts.component.ModuleComponentIdentifier
|
|
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
|
|
|
plugins {
|
|
alias(libs.plugins.android.application)
|
|
alias(libs.plugins.compose)
|
|
alias(libs.plugins.hilt)
|
|
alias(libs.plugins.ksp)
|
|
}
|
|
|
|
val releaseVersion = Properties().apply {
|
|
rootProject.file("release.properties").inputStream().use(::load)
|
|
}
|
|
|
|
val generateThirdPartyNotices = tasks.register<Exec>("generateThirdPartyNotices") {
|
|
val inventory = layout.buildDirectory.file("reports/license-artifacts.json")
|
|
val output = layout.buildDirectory.file("generated/notices/assets/third-party-notices.txt")
|
|
outputs.file(output)
|
|
outputs.upToDateWhen { false }
|
|
workingDir = rootProject.projectDir.parentFile
|
|
doFirst {
|
|
val rows = configurations.getByName("releaseRuntimeClasspath").incoming.artifactView {
|
|
componentFilter { it is ModuleComponentIdentifier }
|
|
}.artifacts.artifacts.map { artifact ->
|
|
val id = artifact.id.componentIdentifier as ModuleComponentIdentifier
|
|
mapOf(
|
|
"component" to "${id.group}:${id.module}:${id.version}",
|
|
"path" to artifact.file.absolutePath
|
|
)
|
|
}
|
|
inventory.get().asFile.apply {
|
|
parentFile.mkdirs()
|
|
writeText(JsonOutput.toJson(rows))
|
|
}
|
|
commandLine(
|
|
"python3",
|
|
".gitea/scripts/android_notices.py",
|
|
inventory.get().asFile,
|
|
output.get().asFile
|
|
)
|
|
}
|
|
notCompatibleWithConfigurationCache("Resolves release license files under the project lock")
|
|
}
|
|
|
|
android {
|
|
namespace = "de.rfc1437.ironstorage"
|
|
compileSdk = libs.versions.compileSdk.get().toInt()
|
|
ndkVersion = libs.versions.ndk.get()
|
|
defaultConfig {
|
|
minSdk = libs.versions.minSdk.get().toInt()
|
|
applicationId = "de.rfc1437.ironstorage"
|
|
targetSdk = libs.versions.compileSdk.get().toInt()
|
|
versionCode = releaseVersion.getProperty("versionCode").toInt()
|
|
versionName = releaseVersion.getProperty("versionName")
|
|
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
|
ndk { abiFilters += listOf("arm64-v8a", "armeabi-v7a") }
|
|
}
|
|
compileOptions {
|
|
sourceCompatibility = JavaVersion.VERSION_17
|
|
targetCompatibility = JavaVersion.VERSION_17
|
|
}
|
|
buildFeatures { compose = true }
|
|
sourceSets.getByName(
|
|
"main"
|
|
).assets.srcDir(layout.buildDirectory.dir("generated/notices/assets").get().asFile)
|
|
buildTypes {
|
|
debug { isDebuggable = true }
|
|
release {
|
|
isMinifyEnabled = true
|
|
isShrinkResources = true
|
|
ndk { debugSymbolLevel = "FULL" }
|
|
proguardFiles(
|
|
getDefaultProguardFile("proguard-android-optimize.txt"),
|
|
"proguard-rules.pro"
|
|
)
|
|
}
|
|
}
|
|
buildTypes.create("benchmark") {
|
|
initWith(buildTypes.getByName("release"))
|
|
signingConfig = signingConfigs.getByName("debug")
|
|
matchingFallbacks += "release"
|
|
}
|
|
sourceSets.getByName("benchmark").kotlin.srcDir("src/release/kotlin")
|
|
buildTypes.create("profile") {
|
|
initWith(buildTypes.getByName("benchmark"))
|
|
isMinifyEnabled = false
|
|
isShrinkResources = false
|
|
}
|
|
sourceSets.getByName("profile").apply {
|
|
kotlin.srcDir("src/release/kotlin")
|
|
manifest.srcFile("src/benchmark/AndroidManifest.xml")
|
|
}
|
|
packaging { resources.excludes += "/META-INF/{AL2.0,LGPL2.1}" }
|
|
lint {
|
|
abortOnError = true
|
|
warningsAsErrors = true
|
|
// The user scoped this milestone to ARM Android; x86 ChromeOS is excluded.
|
|
disable += "ChromeOsAbiSupport"
|
|
}
|
|
}
|
|
|
|
tasks.named("preBuild") { dependsOn(generateThirdPartyNotices) }
|
|
|
|
kotlin {
|
|
jvmToolchain(25)
|
|
compilerOptions {
|
|
jvmTarget.set(JvmTarget.JVM_17)
|
|
allWarningsAsErrors.set(true)
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
implementation(libs.credentials)
|
|
implementation(libs.autofill)
|
|
implementation(project(":features"))
|
|
implementation(project(":core"))
|
|
implementation(project(":platform"))
|
|
implementation(libs.fragment)
|
|
implementation(platform(libs.compose.bom))
|
|
implementation(libs.compose.ui)
|
|
implementation(libs.compose.material3)
|
|
implementation(libs.compose.adaptive)
|
|
implementation(libs.lifecycle.compose)
|
|
implementation(libs.lifecycle.viewmodel)
|
|
implementation(libs.navigation.runtime)
|
|
implementation(libs.navigation.ui)
|
|
implementation(libs.activity.compose)
|
|
implementation(libs.hilt.android)
|
|
ksp(libs.hilt.compiler)
|
|
androidTestImplementation(platform(libs.compose.bom))
|
|
androidTestImplementation(libs.compose.ui.test)
|
|
androidTestImplementation(libs.compose.ui.test.accessibility)
|
|
androidTestImplementation(libs.android.test.runner)
|
|
androidTestImplementation(libs.android.test.espresso)
|
|
implementation(libs.coroutines.android)
|
|
testImplementation(libs.coroutines.test)
|
|
testImplementation(libs.junit)
|
|
}
|