feat: generate android apk
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
|
||||
import java.util.Properties
|
||||
import java.io.FileInputStream
|
||||
|
||||
plugins {
|
||||
id("com.android.application")
|
||||
@@ -15,12 +14,13 @@ val tauriProperties = Properties().apply {
|
||||
}
|
||||
}
|
||||
|
||||
// Load release keystore properties
|
||||
// Load signing credentials
|
||||
val keystoreProperties = Properties().apply {
|
||||
val keystoreFile = rootProject.file("keystore.properties")
|
||||
if (keystoreFile.exists()) {
|
||||
keystoreFile.inputStream().use { load(it) }
|
||||
require(keystoreFile.exists()) {
|
||||
"Missing keystore.properties"
|
||||
}
|
||||
keystoreFile.inputStream().use { load(it) }
|
||||
}
|
||||
|
||||
android {
|
||||
@@ -32,21 +32,27 @@ android {
|
||||
applicationId = "com.lucas.thomann_dsp_app"
|
||||
minSdk = 24
|
||||
targetSdk = 36
|
||||
versionCode = tauriProperties.getProperty("tauri.android.versionCode", "1").toInt()
|
||||
versionName = tauriProperties.getProperty("tauri.android.versionName", "1.0")
|
||||
versionCode = tauriProperties
|
||||
.getProperty("tauri.android.versionCode", "1").toInt()
|
||||
versionName = tauriProperties
|
||||
.getProperty("tauri.android.versionName", "1.0")
|
||||
}
|
||||
|
||||
// Release signing configuration
|
||||
signingConfigs {
|
||||
create("release") {
|
||||
val keystorePath = keystoreProperties.getProperty("storeFile")
|
||||
?: error("Missing storeFile")
|
||||
|
||||
if (keystorePath != null) {
|
||||
storeFile = file(keystorePath)
|
||||
storePassword = keystoreProperties.getProperty("password")
|
||||
keyAlias = keystoreProperties.getProperty("keyAlias")
|
||||
keyPassword = keystoreProperties.getProperty("password")
|
||||
}
|
||||
storeFile = rootProject.file(keystorePath)
|
||||
|
||||
storePassword = keystoreProperties.getProperty("storePassword")
|
||||
?: error("Missing storePassword")
|
||||
|
||||
keyAlias = keystoreProperties.getProperty("keyAlias")
|
||||
?: error("Missing keyAlias")
|
||||
|
||||
keyPassword = keystoreProperties.getProperty("keyPassword")
|
||||
?: error("Missing keyPassword")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,6 +62,7 @@ android {
|
||||
isDebuggable = true
|
||||
isJniDebuggable = true
|
||||
isMinifyEnabled = false
|
||||
|
||||
packaging {
|
||||
jniLibs.keepDebugSymbols.add("*/arm64-v8a/*.so")
|
||||
jniLibs.keepDebugSymbols.add("*/armeabi-v7a/*.so")
|
||||
@@ -65,14 +72,14 @@ android {
|
||||
}
|
||||
|
||||
getByName("release") {
|
||||
isMinifyEnabled = true
|
||||
|
||||
isMinifyEnabled = false
|
||||
signingConfig = signingConfigs.getByName("release")
|
||||
|
||||
proguardFiles(
|
||||
*fileTree(".") { include("**/*.pro") }
|
||||
.plus(getDefaultProguardFile("proguard-android-optimize.txt"))
|
||||
.toList().toTypedArray()
|
||||
.toList()
|
||||
.toTypedArray()
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -96,6 +103,7 @@ dependencies {
|
||||
implementation("androidx.activity:activity-ktx:1.10.1")
|
||||
implementation("com.google.android.material:material:1.12.0")
|
||||
implementation("androidx.lifecycle:lifecycle-process:2.10.0")
|
||||
|
||||
testImplementation("junit:junit:4.13.2")
|
||||
androidTestImplementation("androidx.test.ext:junit:1.1.4")
|
||||
androidTestImplementation("androidx.test.espresso:espresso-core:3.5.0")
|
||||
|
||||
Reference in New Issue
Block a user