diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5e6754a..f031734 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -48,7 +48,7 @@ jobs: cache: 'gradle' - name: Build APK - run: ./gradlew assemble + run: ./gradlew assembleSignedRelease # - name: Upload APK # uses: actions/upload-artifact@v4 @@ -61,4 +61,4 @@ jobs: if: startsWith(github.ref, 'refs/tags/') with: files: | - app/build/outputs/apk/release/app-release.apk \ No newline at end of file + app/build/outputs/apk/signedRelease/app-release.apk \ No newline at end of file diff --git a/app/build.gradle b/app/build.gradle index 3f2ab1b..11f0397 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -5,9 +5,6 @@ plugins { id 'com.mikepenz.aboutlibraries.plugin' version '11.1.1' } -def keystorePropertiesFile = rootProject.file("app/keystore.properties") -def keystoreProperties = new Properties() -keystoreProperties.load(new FileInputStream(keystorePropertiesFile)) android { namespace 'net.helcel.beans' @@ -20,22 +17,37 @@ android { versionCode 1 versionName "0.1a" } - signingConfigs { create("release") { - keyAlias keystoreProperties['keyAlias'] - keyPassword keystoreProperties['keyPassword'] - storeFile file(keystoreProperties['storeFile']) - storePassword keystoreProperties['storePassword'] + try { + def keystorePropertiesFile = rootProject.file("app/keystore.properties") + def keystoreProperties = new Properties() + keystoreProperties.load(new FileInputStream(keystorePropertiesFile)) + + keyAlias keystoreProperties['keyAlias'] + keyPassword keystoreProperties['keyPassword'] + storeFile file(keystoreProperties['storeFile']) + storePassword keystoreProperties['storePassword'] + } catch (FileNotFoundException e) { + println("File not found: ${e.message}") + } } } buildTypes { + debug { + debuggable true + } release { minifyEnabled true shrinkResources false proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' + } + signedRelease { + minifyEnabled true + shrinkResources false + proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' signingConfig = signingConfigs.getByName("release") } }