Files
Yuvomi-App/android/app/build.gradle.kts
T
Yuvomi Mobile Contributors 7ac9882307
Android validation / emulator (37.0) (push) Failing after 3s
Android validation / emulator (35) (push) Failing after 4s
iOS validation / simulator (push) Successful in 59s
Android validation / build (push) Successful in 5m30s
feat(android): align native preview with measured PWA design
2026-10-21 10:45:16 +02:00

108 lines
4.1 KiB
Kotlin

plugins {
id("com.android.application")
id("org.jetbrains.kotlin.plugin.compose")
}
android {
namespace = "community.yuvomi.mobile"
compileSdk { version = release(37) { minorApiLevel = 0 } }
defaultConfig {
applicationId = "community.yuvomi.mobile"
minSdk = 26
targetSdk = 37
versionCode = 4
versionName = "0.2.2-native-preview"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
isMinifyEnabled = true
isShrinkResources = true
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro",
)
// Signing is deliberately supplied by the authorized release maintainer.
}
create("integration") {
initWith(getByName("debug"))
applicationIdSuffix = ".integration"
matchingFallbacks += "debug"
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
buildFeatures { compose = true }
sourceSets.getByName("androidTest").kotlin.directories.apply {
clear()
add("src/androidTestNative/java")
}
lint {
abortOnError = true
warningsAsErrors = true
}
if (providers.gradleProperty("integration").isPresent) {
testBuildType = "integration"
sourceSets.getByName(
"androidTest",
).kotlin.directories.add("src/androidTestNativeIntegration/java")
val testResources = providers.environmentVariable("YUVOMI_TEST_RES").get()
sourceSets.getByName("integration").res.directories.add(testResources)
defaultConfig.testInstrumentationRunnerArguments["server"] =
providers.environmentVariable("YUVOMI_TEST_URL").get()
defaultConfig.testInstrumentationRunnerArguments["password"] =
providers.environmentVariable("YUVOMI_TEST_PASSWORD").get()
}
}
kotlin { compilerOptions { jvmTarget.set(org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17) } }
dependencyLocking { lockAllConfigurations() }
// AGP's device-test tools still request vulnerable older wire libraries. These
// are host-only, not APK dependencies; stay within binary-compatible minor lines.
configurations.configureEach {
if (name.startsWith("_internal-unified-test-platform") || name == "androidLintTool" ||
name == "unified-test-platform-gradle-work-action"
) {
resolutionStrategy.eachDependency {
when (requested.group) {
"io.netty" -> {
useVersion("4.1.139.Final")
because("Remediate published host-test HTTP/TLS advisories")
}
"com.google.protobuf" -> {
useVersion("3.25.9")
because("Remediate protobuf recursion/DoS advisories")
}
"org.bouncycastle" -> {
useVersion("1.86")
because("Remediate published build-tool cryptography advisories")
}
"org.apache.commons" -> if (requested.name == "commons-lang3") useVersion("3.21.0")
"org.apache.httpcomponents" -> if (requested.name ==
"httpclient"
) {
useVersion("4.5.14")
}
}
}
}
}
dependencies {
implementation("androidx.activity:activity-ktx:1.10.1")
implementation("androidx.core:core-ktx:1.16.0")
implementation("androidx.activity:activity-compose:1.10.1")
implementation("androidx.compose.material3:material3:1.4.0")
implementation("androidx.lifecycle:lifecycle-viewmodel-compose:2.9.4")
testImplementation("junit:junit:4.13.2")
testImplementation("org.json:json:20260814")
androidTestImplementation("androidx.test:runner:1.6.2")
androidTestImplementation("androidx.test.ext:junit:1.2.1")
androidTestImplementation("androidx.test.espresso:espresso-core:3.6.1")
androidTestImplementation("androidx.compose.ui:ui-test-junit4:1.9.0")
}