91 lines
2.7 KiB
Text
91 lines
2.7 KiB
Text
|
|
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.siriusdevops.onionwire"
|
||
|
|
compileSdk = 36
|
||
|
|
|
||
|
|
// Same ABI selection as :sdk. JNA ships libjnidispatch.so for several ABIs;
|
||
|
|
// without this filter the APK carries native code for ABIs we never built
|
||
|
|
// our Rust lib for.
|
||
|
|
val onionwireAbis: List<String> = (findProperty("onionwire.abis") as String?)
|
||
|
|
?.split(',')?.map(String::trim)?.filter(String::isNotEmpty)
|
||
|
|
?: listOf("arm64-v8a")
|
||
|
|
|
||
|
|
defaultConfig {
|
||
|
|
applicationId = "com.siriusdevops.onionwire"
|
||
|
|
minSdk = 26
|
||
|
|
targetSdk = 36
|
||
|
|
versionCode = 1
|
||
|
|
versionName = "0.1.0"
|
||
|
|
ndk {
|
||
|
|
abiFilters += onionwireAbis
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
buildTypes {
|
||
|
|
debug {
|
||
|
|
// Sideload / device-test builds. Signed with the standard debug key.
|
||
|
|
applicationIdSuffix = ".debug"
|
||
|
|
versionNameSuffix = "-debug"
|
||
|
|
}
|
||
|
|
release {
|
||
|
|
// Deliberately NOT minified in this card: there is no on-device
|
||
|
|
// crash-deobfuscation story yet, and shipping R8 without testing
|
||
|
|
// the JNI/uniffi surface on a real device is how you get a
|
||
|
|
// mysterious UnsatisfiedLinkError in the field.
|
||
|
|
// Enable together with mapping-file upload; keeps already exist in
|
||
|
|
// :sdk/consumer-rules.pro.
|
||
|
|
isMinifyEnabled = false
|
||
|
|
isShrinkResources = false
|
||
|
|
// Signed with the debug keystore so the release APK installs.
|
||
|
|
// This is NOT a Play upload key — see android/README.md.
|
||
|
|
signingConfig = signingConfigs.getByName("debug")
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
compileOptions {
|
||
|
|
sourceCompatibility = JavaVersion.VERSION_17
|
||
|
|
targetCompatibility = JavaVersion.VERSION_17
|
||
|
|
}
|
||
|
|
|
||
|
|
buildFeatures {
|
||
|
|
compose = true
|
||
|
|
}
|
||
|
|
|
||
|
|
packaging {
|
||
|
|
resources {
|
||
|
|
excludes += "/META-INF/{AL2.0,LGPL2.1}"
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
kotlin {
|
||
|
|
compilerOptions {
|
||
|
|
jvmTarget.set(JvmTarget.JVM_17)
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
dependencies {
|
||
|
|
implementation(project(":sdk"))
|
||
|
|
|
||
|
|
implementation(libs.androidx.core.ktx)
|
||
|
|
implementation(libs.androidx.activity.compose)
|
||
|
|
implementation(libs.androidx.lifecycle.runtime.compose)
|
||
|
|
implementation(libs.androidx.lifecycle.viewmodel.compose)
|
||
|
|
implementation(libs.androidx.navigation.compose)
|
||
|
|
|
||
|
|
implementation(platform(libs.compose.bom))
|
||
|
|
implementation(libs.compose.ui)
|
||
|
|
implementation(libs.compose.ui.graphics)
|
||
|
|
implementation(libs.compose.ui.tooling.preview)
|
||
|
|
implementation(libs.compose.material3)
|
||
|
|
|
||
|
|
debugImplementation(libs.compose.ui.tooling)
|
||
|
|
}
|