chore: configure release signing and bump version

This commit is contained in:
Andrew 2026-06-17 04:09:42 +07:00
parent 47da789143
commit 1243c37fe2
2 changed files with 28 additions and 7 deletions

View file

@ -1,3 +1,5 @@
import java.util.Properties
plugins {
id("com.android.application")
id("kotlin-android")
@ -5,6 +7,13 @@ plugins {
id("dev.flutter.flutter-gradle-plugin")
}
val localProps = Properties().apply {
val localPropsFile = rootProject.file("local.properties")
if (localPropsFile.exists()) {
load(localPropsFile.inputStream())
}
}
android {
namespace = "xyz.nuark.update_forge_companion"
compileSdk = flutter.compileSdkVersion
@ -21,21 +30,33 @@ android {
}
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId = "xyz.nuark.update_forge_companion"
// You can update the following values to match your application needs.
// For more information, see: https://flutter.dev/to/review-gradle-config.
minSdk = flutter.minSdkVersion
targetSdk = flutter.targetSdkVersion
versionCode = flutter.versionCode
versionName = flutter.versionName
}
signingConfigs {
create("release") {
val storeFile = localProps.getProperty("storeFile")
if (storeFile != null && storeFile.isNotEmpty()) {
storeFile = file(storeFile)
storePassword = localProps.getProperty("storePassword")
keyAlias = localProps.getProperty("keyAlias")
keyPassword = localProps.getProperty("keyPassword")
}
}
}
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.getByName("debug")
val storeFile = localProps.getProperty("storeFile")
signingConfig = if (storeFile != null && storeFile.isNotEmpty()) {
signingConfigs.getByName("release")
} else {
signingConfigs.getByName("debug")
}
}
}
}

View file

@ -1,7 +1,7 @@
name: update_forge_companion
description: "UpdateForge Companion"
publish_to: "none"
version: 1.0.0+1
version: 1.0.1+2
environment:
sdk: ^3.12.0-210.2.beta