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 open_collective: spotube
ko_fi: krtirtho
patreon: krtirtho patreon: krtirtho
custom: custom:
- "https://www.buymeacoffee.com/krtirtho" - "https://www.buymeacoffee.com/krtirtho"

View File

@ -35,6 +35,8 @@ jobs:
build/Spotube-linux-x86_64.tar.xz build/Spotube-linux-x86_64.tar.xz
build/Spotube-*-x86_64.AppImage build/Spotube-*-x86_64.AppImage
# Building Android Application # 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: flutter build apk
- run: make apk - run: make apk
- uses: actions/upload-artifact@v2 - uses: actions/upload-artifact@v2

5
.gitignore vendored
View File

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

View File

@ -25,6 +25,12 @@ apply plugin: 'com.android.application'
apply plugin: 'kotlin-android' apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 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 { android {
compileSdkVersion 31 compileSdkVersion 31
@ -51,11 +57,17 @@ android {
multiDexEnabled true multiDexEnabled true
} }
signingConfigs {
release {
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
storePassword keystoreProperties['storePassword']
}
}
buildTypes { buildTypes {
release { release {
// TODO: Add your own signing config for the release build. signingConfig signingConfigs.release
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig signingConfigs.debug
} }
} }
} }