Add release signing configuration
- Load signing credentials from local.properties (not committed) - Keystore stored in .signing/ directory (not committed) - Release builds are now signed and installable Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
0cd41e9814
commit
b235231390
2 changed files with 24 additions and 0 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -89,3 +89,4 @@ lint/tmp/
|
||||||
.Trashes
|
.Trashes
|
||||||
ehthumbs.db
|
ehthumbs.db
|
||||||
Thumbs.db
|
Thumbs.db
|
||||||
|
.signing/
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,35 @@
|
||||||
|
import java.util.Properties
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
alias(libs.plugins.android.application)
|
alias(libs.plugins.android.application)
|
||||||
alias(libs.plugins.kotlin.android)
|
alias(libs.plugins.kotlin.android)
|
||||||
alias(libs.plugins.kotlin.compose)
|
alias(libs.plugins.kotlin.compose)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Load signing properties from local.properties
|
||||||
|
val keystoreProperties = Properties().apply {
|
||||||
|
val localPropertiesFile = rootProject.file("local.properties")
|
||||||
|
if (localPropertiesFile.exists()) {
|
||||||
|
load(localPropertiesFile.inputStream())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
namespace = "no.naiv.tiltshift"
|
namespace = "no.naiv.tiltshift"
|
||||||
compileSdk = 35
|
compileSdk = 35
|
||||||
|
|
||||||
|
signingConfigs {
|
||||||
|
create("release") {
|
||||||
|
val storeFilePath = keystoreProperties["storeFile"] as String?
|
||||||
|
if (storeFilePath != null) {
|
||||||
|
storeFile = file(storeFilePath)
|
||||||
|
storePassword = keystoreProperties["storePassword"] as String
|
||||||
|
keyAlias = keystoreProperties["keyAlias"] as String
|
||||||
|
keyPassword = keystoreProperties["keyPassword"] as String
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId = "no.naiv.tiltshift"
|
applicationId = "no.naiv.tiltshift"
|
||||||
minSdk = 35
|
minSdk = 35
|
||||||
|
|
@ -26,6 +48,7 @@ android {
|
||||||
release {
|
release {
|
||||||
isMinifyEnabled = true
|
isMinifyEnabled = true
|
||||||
isShrinkResources = true
|
isShrinkResources = true
|
||||||
|
signingConfig = signingConfigs.getByName("release")
|
||||||
proguardFiles(
|
proguardFiles(
|
||||||
getDefaultProguardFile("proguard-android-optimize.txt"),
|
getDefaultProguardFile("proguard-android-optimize.txt"),
|
||||||
"proguard-rules.pro"
|
"proguard-rules.pro"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue