1
0
forked from firka/firka

add custom release key config, and rename namespace

This commit is contained in:
zypherift
2025-02-11 00:57:57 +01:00
parent 33e767f8f8
commit febda3c8ca

View File

@@ -5,8 +5,23 @@ plugins {
id "dev.flutter.flutter-gradle-plugin"
}
// Load keystore properties from the independent secrets folder
def keystoreProperties = new Properties()
// Automatically get the absolute path to the secrets/keystore.properties file based on the project root
def keystorePropertiesFile = new File(rootProject.projectDir, '../../secrets/keystore.properties')
if (keystorePropertiesFile.exists()) {
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
} else {
throw new FileNotFoundException("Keystore properties file not found at: ${keystorePropertiesFile.absolutePath}")
}
println "Keystore properties file exists: ${keystorePropertiesFile.exists()}"
println "Keystore file path: ${keystoreProperties['storeFile']}"
android {
namespace = "hu.qwit.filc.filc"
namespace = "hu.qwit.filc"
compileSdk = flutter.compileSdkVersion
ndkVersion = flutter.ndkVersion
@@ -21,7 +36,7 @@ android {
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId = "hu.qwit.filc.filc"
applicationId = "hu.qwit.filc"
// 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
@@ -30,15 +45,22 @@ android {
versionName = flutter.versionName
}
signingConfigs {
release {
storeFile file(keystoreProperties['storeFile']) // Path to the keystore file
storePassword keystoreProperties['storePassword'] // Keystore password
keyAlias keystoreProperties['keyAlias'] // Key alias
keyPassword keystoreProperties['keyPassword'] // Key password
}
}
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 // Use the release signing config
}
}
}
flutter {
source = "../.."
}
}