Ubisam-MobileGit/app/build.gradle.kts
choiminyeong 69556b1e23 TASK-066: download page and in-app update check
- version 0.2.0 (versionCode 2)
- The app reads version.json from the download page once at launch and
  offers the page when a newer build is out; settings shows the version
  and a check button.
- tools/publish-download.py encrypts an APK under the download password
  and writes the page that decrypts it in the browser.

Agent: main (opus)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 20:52:45 +09:00

89 lines
2.7 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 = 2
versionName = "0.2.0"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
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)
}