Add Android release signing configuration

- Update build.gradle with signingConfigs for release builds
- Enable minification and resource shrinking for release
- Add keystore.properties.example template
- Update .gitignore to exclude keystore and credentials

https://claude.ai/code/session_01WzGEr7t8hWFyiANo22iokS
This commit is contained in:
Claude 2026-01-31 22:04:54 +00:00
parent 2278fa2849
commit b3011943c6
No known key found for this signature in database
3 changed files with 34 additions and 6 deletions

8
android/.gitignore vendored
View file

@ -52,10 +52,10 @@ captures/
# Comment next line if keeping position of elements in Navigation Editor is relevant for you
.idea/navEditor.xml
# Keystore files
# Uncomment the following lines if you do not want to check your keystore files in.
#*.jks
#*.keystore
# Keystore files - DO NOT commit these
*.jks
*.keystore
keystore.properties
# External native build folder generated in Android Studio 2.2 and later
.externalNativeBuild

View file

@ -1,5 +1,12 @@
apply plugin: 'com.android.application'
// Load keystore properties for release signing
def keystorePropertiesFile = rootProject.file('keystore.properties')
def keystoreProperties = new Properties()
if (keystorePropertiesFile.exists()) {
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
}
android {
namespace = "com.aethex.os"
compileSdk = rootProject.ext.compileSdkVersion
@ -16,10 +23,24 @@ android {
ignoreAssetsPattern = '!.svn:!.git:!.ds_store:!*.scc:.*:!CVS:!thumbs.db:!picasa.ini:!*~'
}
}
signingConfigs {
release {
if (keystorePropertiesFile.exists()) {
storeFile file(keystoreProperties['storeFile'])
storePassword keystoreProperties['storePassword']
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
}
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
if (keystorePropertiesFile.exists()) {
signingConfig signingConfigs.release
}
}
}
}

View file

@ -0,0 +1,7 @@
# Copy this file to keystore.properties and fill in your values
# DO NOT commit keystore.properties to version control
storeFile=app/aethex-release.keystore
storePassword=your-store-password
keyAlias=aethex
keyPassword=your-key-password