Fix debug build if no key
This commit is contained in:
parent
71acf04f20
commit
3fe83cff2e
4
.github/workflows/build.yml
vendored
4
.github/workflows/build.yml
vendored
@ -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
|
||||
app/build/outputs/apk/signedRelease/app-release.apk
|
@ -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")
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user