| 1 |
import java.util.Properties |
| 2 |
|
| 3 |
plugins { |
| 4 |
id("com.android.application") |
| 5 |
id("org.jetbrains.kotlin.android") |
| 6 |
id("rust") |
| 7 |
} |
| 8 |
|
| 9 |
val tauriProperties = Properties().apply { |
| 10 |
val propFile = file("tauri.properties") |
| 11 |
if (propFile.exists()) { |
| 12 |
propFile.inputStream().use { load(it) } |
| 13 |
} |
| 14 |
} |
| 15 |
|
| 16 |
val keyProperties = Properties().apply { |
| 17 |
val propFile = rootProject.file("key.properties") |
| 18 |
if (propFile.exists()) { |
| 19 |
propFile.inputStream().use { load(it) } |
| 20 |
} |
| 21 |
} |
| 22 |
|
| 23 |
android { |
| 24 |
compileSdk = 36 |
| 25 |
namespace = "com.goingson.app" |
| 26 |
|
| 27 |
signingConfigs { |
| 28 |
create("release") { |
| 29 |
keyAlias = keyProperties["keyAlias"] as String? |
| 30 |
keyPassword = keyProperties["keyPassword"] as String? |
| 31 |
storeFile = keyProperties["storeFile"]?.let { file(it as String) } |
| 32 |
storePassword = keyProperties["storePassword"] as String? |
| 33 |
} |
| 34 |
} |
| 35 |
|
| 36 |
defaultConfig { |
| 37 |
manifestPlaceholders["usesCleartextTraffic"] = "false" |
| 38 |
applicationId = "com.goingson.app" |
| 39 |
minSdk = 24 |
| 40 |
targetSdk = 36 |
| 41 |
versionCode = tauriProperties.getProperty("tauri.android.versionCode", "1").toInt() |
| 42 |
versionName = tauriProperties.getProperty("tauri.android.versionName", "1.0") |
| 43 |
} |
| 44 |
buildTypes { |
| 45 |
getByName("debug") { |
| 46 |
manifestPlaceholders["usesCleartextTraffic"] = "true" |
| 47 |
isDebuggable = true |
| 48 |
isJniDebuggable = true |
| 49 |
isMinifyEnabled = false |
| 50 |
packaging { jniLibs.keepDebugSymbols.add("*/arm64-v8a/*.so") |
| 51 |
jniLibs.keepDebugSymbols.add("*/armeabi-v7a/*.so") |
| 52 |
jniLibs.keepDebugSymbols.add("*/x86/*.so") |
| 53 |
jniLibs.keepDebugSymbols.add("*/x86_64/*.so") |
| 54 |
} |
| 55 |
} |
| 56 |
getByName("release") { |
| 57 |
signingConfig = signingConfigs.getByName("release") |
| 58 |
isMinifyEnabled = true |
| 59 |
proguardFiles( |
| 60 |
*fileTree(".") { include("**/*.pro") } |
| 61 |
.plus(getDefaultProguardFile("proguard-android-optimize.txt")) |
| 62 |
.toList().toTypedArray() |
| 63 |
) |
| 64 |
} |
| 65 |
} |
| 66 |
kotlinOptions { |
| 67 |
jvmTarget = "1.8" |
| 68 |
} |
| 69 |
buildFeatures { |
| 70 |
buildConfig = true |
| 71 |
} |
| 72 |
} |
| 73 |
|
| 74 |
rust { |
| 75 |
rootDirRel = "../../../" |
| 76 |
} |
| 77 |
|
| 78 |
dependencies { |
| 79 |
implementation("androidx.webkit:webkit:1.14.0") |
| 80 |
implementation("androidx.appcompat:appcompat:1.7.1") |
| 81 |
implementation("androidx.activity:activity-ktx:1.10.1") |
| 82 |
implementation("com.google.android.material:material:1.12.0") |
| 83 |
testImplementation("junit:junit:4.13.2") |
| 84 |
androidTestImplementation("androidx.test.ext:junit:1.1.4") |
| 85 |
androidTestImplementation("androidx.test.espresso:espresso-core:3.5.0") |
| 86 |
} |
| 87 |
|
| 88 |
apply(from = "tauri.build.gradle.kts") |
| 89 |
|