Skip to content

Commit

Permalink
feat: codesigning
Browse files Browse the repository at this point in the history
  • Loading branch information
mattyg committed Oct 4, 2024
1 parent ce9ee7b commit fc55f97
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions src-tauri/gen/android/app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import java.util.Properties
import java.io.FileInputStream

plugins {
id("com.android.application")
Expand All @@ -13,36 +14,50 @@ val tauriProperties = Properties().apply {
}
}

val keystorePropertiesFile = rootProject.file("key.properties")
val keystoreProperties = Properties()
keystoreProperties.load(FileInputStream(keystorePropertiesFile))

android {
compileSdk = 34
namespace = "com.holochainapps.mobile_conductor_admin"
defaultConfig {
manifestPlaceholders["usesCleartextTraffic"] = "false"
manifestPlaceholders["usesCleartextTraffic"] = "true"
applicationId = "com.holochainapps.mobile_conductor_admin"
minSdk = 24
targetSdk = 34
versionCode = tauriProperties.getProperty("tauri.android.versionCode", "1").toInt()
versionName = tauriProperties.getProperty("tauri.android.versionName", "1.0")
}
signingConfigs {
create("release") {
keyAlias = keystoreProperties["keyAlias"] as String
keyPassword = keystoreProperties["keyPassword"] as String
storeFile = file(keystoreProperties["storeFile"] as String)
storePassword = keystoreProperties["storePassword"] as String
}
}
buildTypes {
getByName("debug") {
manifestPlaceholders["usesCleartextTraffic"] = "true"
isDebuggable = true
isJniDebuggable = true
isMinifyEnabled = false
packaging { jniLibs.keepDebugSymbols.add("*/arm64-v8a/*.so")
packaging {
jniLibs.keepDebugSymbols.add("*/arm64-v8a/*.so")
jniLibs.keepDebugSymbols.add("*/armeabi-v7a/*.so")
jniLibs.keepDebugSymbols.add("*/x86/*.so")
jniLibs.keepDebugSymbols.add("*/x86_64/*.so")
}
}
getByName("release") {
isMinifyEnabled = true
isMinifyEnabled = false
proguardFiles(
*fileTree(".") { include("**/*.pro") }
.plus(getDefaultProguardFile("proguard-android-optimize.txt"))
.toList().toTypedArray()
)
signingConfig = signingConfigs.getByName("release")
}
}
kotlinOptions {
Expand Down

0 comments on commit fc55f97

Please sign in to comment.