202 lines
6.0 KiB
Kotlin
202 lines
6.0 KiB
Kotlin
import com.google.protobuf.gradle.*
|
|
|
|
configurations.all {
|
|
resolutionStrategy {
|
|
force("com.google.protobuf:protobuf-javalite:${libs.versions.protobuf.get()}")
|
|
force("com.google.protobuf:protobuf-kotlin-lite:${libs.versions.protobuf.get()}")
|
|
}
|
|
}
|
|
|
|
plugins {
|
|
alias(libs.plugins.android.application)
|
|
alias(libs.plugins.kotlin.compose)
|
|
alias(libs.plugins.ksp)
|
|
alias(libs.plugins.protobuf)
|
|
}
|
|
|
|
android {
|
|
namespace = "com.bitcointxoko.gudariwallet"
|
|
compileSdk {
|
|
version = release(36) {
|
|
minorApiLevel = 1
|
|
}
|
|
}
|
|
|
|
defaultConfig {
|
|
applicationId = "com.bitcointxoko.gudariwallet"
|
|
minSdk = 26
|
|
targetSdk = 36
|
|
versionCode = 1
|
|
versionName = "1.0"
|
|
|
|
// testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
|
testInstrumentationRunner = "androidx.benchmark.junit4.AndroidBenchmarkRunner"
|
|
testInstrumentationRunnerArguments["androidx.benchmark.suppressErrors"] = "ACTIVITY-MISSING"
|
|
}
|
|
|
|
testBuildType = "benchmark"
|
|
|
|
buildTypes {
|
|
release {
|
|
isMinifyEnabled = false
|
|
proguardFiles(
|
|
getDefaultProguardFile("proguard-android-optimize.txt"),
|
|
"proguard-rules.pro"
|
|
)
|
|
}
|
|
create("benchmark") {
|
|
initWith(buildTypes.getByName("release"))
|
|
signingConfig = signingConfigs.getByName("debug") // sign with debug key for easy deployment
|
|
installation {
|
|
enableBaselineProfile = false // ← disables profile embedding for this build type only
|
|
}
|
|
}
|
|
}
|
|
compileOptions {
|
|
sourceCompatibility = JavaVersion.VERSION_11
|
|
targetCompatibility = JavaVersion.VERSION_11
|
|
}
|
|
buildFeatures {
|
|
compose = true
|
|
buildConfig = true
|
|
}
|
|
sourceSets {
|
|
getByName("main") {
|
|
proto {
|
|
srcDir("src/main/proto")
|
|
}
|
|
}
|
|
getByName("debug") {
|
|
java.srcDirs("build/generated/ksp/debug/kotlin")
|
|
}
|
|
getByName("release") {
|
|
java.srcDirs("build/generated/ksp/release/kotlin")
|
|
}
|
|
getByName("benchmark") {
|
|
java.srcDirs("build/generated/ksp/benchmark/kotlin")
|
|
}
|
|
}
|
|
}
|
|
|
|
androidComponents {
|
|
onVariants(selector().withBuildType("benchmark")) { variant ->
|
|
variant.packaging.resources.excludes.add("baseline-prof.txt")
|
|
variant.packaging.resources.excludes.add("baseline.profm")
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
implementation(platform(libs.androidx.compose.bom))
|
|
implementation(libs.androidx.activity.compose)
|
|
implementation(libs.androidx.compose.material3)
|
|
implementation(libs.androidx.compose.ui)
|
|
implementation(libs.androidx.compose.ui.graphics)
|
|
implementation(libs.androidx.compose.ui.tooling.preview)
|
|
implementation(libs.androidx.core.ktx)
|
|
implementation(libs.androidx.lifecycle.runtime.ktx)
|
|
implementation(libs.androidx.lifecycle.runtime.compose)
|
|
implementation(libs.androidx.material3)
|
|
implementation(libs.androidx.ui)
|
|
testImplementation(libs.junit)
|
|
androidTestImplementation(platform(libs.androidx.compose.bom))
|
|
androidTestImplementation(libs.androidx.compose.ui.test.junit4)
|
|
implementation(libs.androidx.benchmark.junit4)
|
|
androidTestImplementation(libs.androidx.runner)
|
|
androidTestImplementation(libs.androidx.test.ext.junit)
|
|
androidTestImplementation(libs.androidx.espresso.core)
|
|
androidTestImplementation(libs.androidx.junit)
|
|
debugImplementation(libs.androidx.compose.ui.test.manifest)
|
|
debugImplementation(libs.androidx.compose.ui.tooling)
|
|
|
|
// Networking
|
|
implementation(libs.retrofit2.retrofit)
|
|
implementation(libs.converter.gson)
|
|
implementation(libs.okhttp)
|
|
implementation(libs.logging.interceptor)
|
|
|
|
// Coroutines
|
|
implementation(libs.kotlinx.coroutines.android)
|
|
|
|
// Lifecycle / ViewModel
|
|
implementation(libs.androidx.lifecycle.viewmodel.ktx)
|
|
implementation(libs.androidx.lifecycle.viewmodel.compose)
|
|
|
|
// WorkManger
|
|
implementation(libs.androidx.work.runtime.ktx)
|
|
|
|
// DataStore + Proto + Tink
|
|
implementation(libs.datastore.proto)
|
|
implementation(libs.protobuf.kotlin.lite)
|
|
implementation(libs.tink.android)
|
|
|
|
// DataStore
|
|
implementation(libs.androidx.datastore.preferences)
|
|
|
|
// Room
|
|
implementation(libs.room.runtime)
|
|
implementation(libs.room.ktx)
|
|
ksp(libs.room.compiler)
|
|
|
|
// Biometrics
|
|
implementation(libs.androidx.biometric)
|
|
|
|
// JSON
|
|
implementation(libs.gson)
|
|
|
|
// icons
|
|
implementation(libs.androidx.material.icons.extended)
|
|
|
|
// QR
|
|
implementation(libs.zxing.android.embedded)
|
|
|
|
//Navigation
|
|
implementation(libs.androidx.navigation.compose)
|
|
|
|
implementation(libs.androidx.appcompat)
|
|
|
|
// animations
|
|
implementation(libs.androidx.compose.animation)
|
|
|
|
// secp256k1
|
|
implementation(libs.secp256k1.kmp.android)
|
|
|
|
|
|
implementation(libs.lyricist)
|
|
|
|
// Required for @LyricistStrings code generation
|
|
ksp(libs.lyricist.processor)
|
|
}
|
|
|
|
protobuf {
|
|
protoc {
|
|
artifact = libs.protobuf.protoc.get().toString()
|
|
}
|
|
generateProtoTasks {
|
|
all().configureEach { // no "task ->" here
|
|
builtins {
|
|
id("java") {
|
|
option("lite")
|
|
}
|
|
id("kotlin") {
|
|
option("lite")
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
ksp {
|
|
// Make generated code internal instead of public
|
|
arg("lyricist.internalVisibility", "true")
|
|
|
|
// Generate a `strings` shorthand instead of LocalStrings.current
|
|
arg("lyricist.generateStringsProperty", "true")
|
|
|
|
// For multi-module projects (generates LocalDashboardStrings, etc.)
|
|
arg("lyricist.packageName", "com.bitcointxoko.gudariwallet")
|
|
arg("lyricist.moduleName", project.name)
|
|
|
|
// Only for strings.xml migration:
|
|
// arg("lyricist.xml.resourcesPath", android.sourceSets["main"].res.srcDirs.first().absolutePath)
|
|
// arg("lyricist.xml.defaultLanguageTag", "en")
|
|
} |