Ubisam-MobileGit/app/build.gradle.kts
choiminyeong d9450eedb6 TASK-077: a baseline profile for the app's own code, version 0.2.6
The APK names all of com.ubisam.ubgitea as code to compile ahead of
time. The phone does so in the background after installing, and again
after each update; until then the app runs as before.

Agent: main (opus)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 18:30:01 +09:00

92 lines
2.9 KiB
Plaintext

import org.jetbrains.kotlin.gradle.dsl.JvmTarget
plugins {
alias(libs.plugins.android.application)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.kotlin.compose)
}
android {
namespace = "com.ubisam.ubgitea"
compileSdk = 36
defaultConfig {
applicationId = "com.ubisam.ubgitea"
minSdk = 28
targetSdk = 36
// Raised for every build published to the download page (TASK-066), or the app will not
// see it as newer.
versionCode = 8
versionName = "0.2.6"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
// The published build (TASK-076). It carries this PC's debug key, as every build
// published before it did, so it installs over them as an update.
signingConfig = signingConfigs.getByName("debug")
isMinifyEnabled = false
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro",
)
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
buildFeatures {
compose = true
buildConfig = true
}
packaging {
resources.excludes += "/META-INF/{AL2.0,LGPL2.1}"
}
// Debug-build-only diagnostic logging (e.g. HttpTransport.requireSuccess, RepositoryListViewModel
// .toggleFavorite) calls android.util.Log directly. Plain JVM unit tests run against an unmocked
// android.jar where every framework call throws by default; this makes them return harmless
// defaults (0/null/false) instead, so a debug-only Log.w doesn't fail tests that legitimately
// exercise the code path around it.
testOptions {
unitTests {
isReturnDefaultValues = true
}
}
}
kotlin {
compilerOptions {
jvmTarget.set(JvmTarget.JVM_17)
}
}
dependencies {
implementation(libs.androidx.core.ktx)
implementation(libs.androidx.lifecycle.runtime.ktx)
implementation(libs.androidx.lifecycle.viewmodel.compose)
implementation(libs.androidx.lifecycle.viewmodel.ktx)
implementation(libs.androidx.activity.compose)
implementation(libs.androidx.browser)
implementation(platform(libs.androidx.compose.bom))
implementation(libs.androidx.compose.ui)
implementation(libs.androidx.compose.ui.tooling.preview)
implementation(libs.androidx.compose.material3)
implementation(libs.kotlinx.coroutines.android)
implementation(libs.okhttp)
implementation(libs.gson)
implementation(libs.androidx.work.runtime.ktx)
debugImplementation(libs.androidx.compose.ui.tooling)
testImplementation(libs.junit)
testImplementation(libs.kotlinx.coroutines.test)
testImplementation(libs.okhttp.mockwebserver)
testImplementation(libs.androidx.work.testing)
}