Signed Application build script

This commit is contained in:
Kingkor Roy Tirtho 2022-06-15 18:34:31 +06:00
parent 41102b3bb8
commit 5953b30d45
4 changed files with 20 additions and 6 deletions

1
.github/FUNDING.yml vendored
View File

@ -1,5 +1,4 @@
open_collective: spotube
ko_fi: krtirtho
patreon: krtirtho
custom:
- "https://www.buymeacoffee.com/krtirtho"

View File

@ -35,6 +35,8 @@ jobs:
build/Spotube-linux-x86_64.tar.xz
build/Spotube-*-x86_64.AppImage
# Building Android Application
- run: echo ${{ secrets.KEYSTORE }} | base64 --decode > upload-keystore.jks
- run: echo ${{ secrets.KEY_PROPERTIES }} > android/key.properties
- run: flutter build apk
- run: make apk
- uses: actions/upload-artifact@v2

5
.gitignore vendored
View File

@ -45,7 +45,6 @@ app.*.map.json
/android/app/profile
/android/app/release
*.pkg.tar.zst
/aur-struct/*.tar
/aur-struct/src
@ -73,4 +72,6 @@ help.txt
secrets.json
dist
appimage-build
appimage-build
android/key.properties

View File

@ -25,6 +25,12 @@ apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
def keystoreProperties = new Properties()
def keystorePropertiesFile = rootProject.file('key.properties')
if (keystorePropertiesFile.exists()) {
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
}
android {
compileSdkVersion 31
@ -51,11 +57,17 @@ android {
multiDexEnabled true
}
signingConfigs {
release {
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
storePassword keystoreProperties['storePassword']
}
}
buildTypes {
release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig signingConfigs.debug
signingConfig signingConfigs.release
}
}
}