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
script:
- rm -rf AppDir || true
- rm -rf build || true
- rm -rf appimage-build
- flutter pub get
- flutter build linux
- cp -r build/linux/x64/release/bundle AppDir
- mkdir -p AppDir/usr/share/icons/hicolor/64x64/apps
- cp Icons/PNG/nbteditor.png AppDir/usr/share/icons/hicolor/64x64/apps/

View file

@ -5,6 +5,12 @@ plugins {
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 {
namespace = "dev.zontreck.nbteditor"
compileSdk = flutter.compileSdkVersion
@ -30,11 +36,20 @@ android {
versionName = flutter.versionName
}
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
}
}
}