89 lines
2.7 KiB
Plaintext
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 = 5
|
|
versionName = "0.2.3"
|
|
|
|
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)
|
|
}
|