From b3011943c6f424863c8cd16b2ddd48cf713e7073 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 31 Jan 2026 22:04:54 +0000 Subject: [PATCH] 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 --- android/.gitignore | 8 ++++---- android/app/build.gradle | 25 +++++++++++++++++++++++-- android/keystore.properties.example | 7 +++++++ 3 files changed, 34 insertions(+), 6 deletions(-) create mode 100644 android/keystore.properties.example diff --git a/android/.gitignore b/android/.gitignore index 48354a3..eb55338 100644 --- a/android/.gitignore +++ b/android/.gitignore @@ -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 diff --git a/android/app/build.gradle b/android/app/build.gradle index 2383b14..05068bd 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -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 + } } } } diff --git a/android/keystore.properties.example b/android/keystore.properties.example new file mode 100644 index 0000000..e072309 --- /dev/null +++ b/android/keystore.properties.example @@ -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