Enable release keysigning for APK

This commit is contained in:
zontreck 2025-01-23 23:06:55 -07:00
parent f58649076a
commit e6f9a35517
2 changed files with 22 additions and 10 deletions

View file

@ -2,10 +2,7 @@
version: 1 version: 1
script: script:
- rm -rf AppDir || true - rm -rf AppDir || true
- rm -rf build || true
- rm -rf appimage-build - rm -rf appimage-build
- flutter pub get
- flutter build linux
- cp -r build/linux/x64/release/bundle AppDir - cp -r build/linux/x64/release/bundle AppDir
- mkdir -p AppDir/usr/share/icons/hicolor/64x64/apps - mkdir -p AppDir/usr/share/icons/hicolor/64x64/apps
- cp Icons/PNG/nbteditor.png AppDir/usr/share/icons/hicolor/64x64/apps/ - cp Icons/PNG/nbteditor.png AppDir/usr/share/icons/hicolor/64x64/apps/
@ -34,13 +31,13 @@ AppDir:
- libwayland-cursor0 - libwayland-cursor0
files: files:
include: include:
- /lib64/ld-linux-x86-64.so.2 - /lib64/ld-linux-x86-64.so.2
exclude: exclude:
- usr/share/man - usr/share/man
- usr/share/doc/*/README.* - usr/share/doc/*/README.*
- usr/share/doc/*/changelog.* - usr/share/doc/*/changelog.*
- usr/share/doc/*/NEWS.* - usr/share/doc/*/NEWS.*
- usr/share/doc/*/TODO.* - usr/share/doc/*/TODO.*
AppImage: AppImage:
arch: x86_64 arch: x86_64
update-information: guess update-information: guess

View file

@ -5,6 +5,12 @@ plugins {
id "dev.flutter.flutter-gradle-plugin" id "dev.flutter.flutter-gradle-plugin"
} }
def keystoreProperties = new Properties()
def keystorePropertiesFile = rootProject.file('key.properties')
if (keystorePropertiesFile.exists()) {
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
}
android { android {
namespace = "dev.zontreck.nbteditor" namespace = "dev.zontreck.nbteditor"
compileSdk = flutter.compileSdkVersion compileSdk = flutter.compileSdkVersion
@ -30,11 +36,20 @@ android {
versionName = flutter.versionName versionName = flutter.versionName
} }
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. // TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works. // Signing with the debug keys for now, so `flutter run --release` works.
signingConfig = signingConfigs.debug signingConfig = signingConfigs.release
} }
} }
} }