2024-05-24 16:56:21 +03:00
|
|
|
import java.util.Properties
|
|
|
|
|
2022-08-15 18:43:50 +03:00
|
|
|
plugins {
|
|
|
|
id("com.android.application")
|
|
|
|
id("org.jetbrains.kotlin.android")
|
2023-05-12 14:06:50 +03:00
|
|
|
id("rust")
|
2022-08-15 18:43:50 +03:00
|
|
|
{{~#each android-app-plugins}}
|
|
|
|
id("{{this}}"){{/each}}
|
|
|
|
}
|
|
|
|
|
2024-05-24 16:56:21 +03:00
|
|
|
val tauriProperties = Properties().apply {
|
|
|
|
val propFile = file("tauri.properties")
|
|
|
|
if (propFile.exists()) {
|
|
|
|
propFile.inputStream().use { load(it) }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-08-15 18:43:50 +03:00
|
|
|
android {
|
2022-08-18 17:31:07 +03:00
|
|
|
compileSdk = 33
|
2024-05-24 15:22:41 +03:00
|
|
|
namespace = "{{reverse-domain app.identifier}}"
|
2022-08-15 18:43:50 +03:00
|
|
|
defaultConfig {
|
2022-08-25 06:19:47 +03:00
|
|
|
manifestPlaceholders["usesCleartextTraffic"] = "false"
|
2024-05-24 15:22:41 +03:00
|
|
|
applicationId = "{{reverse-domain app.identifier}}"
|
2022-08-15 18:43:50 +03:00
|
|
|
minSdk = {{android.min-sdk-version}}
|
2022-08-18 17:31:07 +03:00
|
|
|
targetSdk = 33
|
2024-05-24 16:56:21 +03:00
|
|
|
versionCode = tauriProperties.getProperty("tauri.android.versionCode", "1").toInt()
|
|
|
|
versionName = tauriProperties.getProperty("tauri.android.versionName", "1.0")
|
2022-08-15 18:43:50 +03:00
|
|
|
}
|
|
|
|
buildTypes {
|
|
|
|
getByName("debug") {
|
2022-08-25 06:19:47 +03:00
|
|
|
manifestPlaceholders["usesCleartextTraffic"] = "true"
|
2022-08-15 18:43:50 +03:00
|
|
|
isDebuggable = true
|
|
|
|
isJniDebuggable = true
|
|
|
|
isMinifyEnabled = false
|
2023-05-12 14:06:50 +03:00
|
|
|
packaging {
|
|
|
|
{{~#each abi-list}}
|
|
|
|
jniLibs.keepDebugSymbols.add("*/{{this}}/*.so")
|
2022-08-15 18:43:50 +03:00
|
|
|
{{/each}}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
getByName("release") {
|
2023-02-13 16:22:03 +03:00
|
|
|
isMinifyEnabled = true
|
2023-05-12 14:06:50 +03:00
|
|
|
proguardFiles(
|
|
|
|
*fileTree(".") { include("**/*.pro") }
|
|
|
|
.plus(getDefaultProguardFile("proguard-android-optimize.txt"))
|
|
|
|
.toList().toTypedArray()
|
|
|
|
)
|
2022-08-15 18:43:50 +03:00
|
|
|
}
|
|
|
|
}
|
2023-05-12 14:06:50 +03:00
|
|
|
kotlinOptions {
|
|
|
|
jvmTarget = "1.8"
|
2022-08-15 18:43:50 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
rust {
|
|
|
|
rootDirRel = "{{root-dir-rel}}"
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
{{~#each android-app-dependencies-platform}}
|
|
|
|
implementation(platform("{{this}}")){{/each}}
|
|
|
|
{{~#each android-app-dependencies}}
|
|
|
|
implementation("{{this}}"){{/each}}
|
2023-05-12 14:06:50 +03:00
|
|
|
implementation("androidx.webkit:webkit:1.6.1")
|
|
|
|
implementation("androidx.appcompat:appcompat:1.6.1")
|
|
|
|
implementation("com.google.android.material:material:1.8.0")
|
2022-08-15 18:43:50 +03:00
|
|
|
testImplementation("junit:junit:4.13.2")
|
2022-11-21 18:50:41 +03:00
|
|
|
androidTestImplementation("androidx.test.ext:junit:1.1.4")
|
|
|
|
androidTestImplementation("androidx.test.espresso:espresso-core:3.5.0")
|
2022-08-15 18:43:50 +03:00
|
|
|
}
|
|
|
|
|
2024-05-24 15:22:41 +03:00
|
|
|
apply(from = "tauri.build.gradle.kts")
|