forked from firka/firka
add custom release key config, and rename namespace
This commit is contained in:
@@ -5,8 +5,23 @@ plugins {
|
|||||||
id "dev.flutter.flutter-gradle-plugin"
|
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 {
|
android {
|
||||||
namespace = "hu.qwit.filc.filc"
|
namespace = "hu.qwit.filc"
|
||||||
compileSdk = flutter.compileSdkVersion
|
compileSdk = flutter.compileSdkVersion
|
||||||
ndkVersion = flutter.ndkVersion
|
ndkVersion = flutter.ndkVersion
|
||||||
|
|
||||||
@@ -21,7 +36,7 @@ android {
|
|||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
|
// 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.
|
// You can update the following values to match your application needs.
|
||||||
// For more information, see: https://flutter.dev/to/review-gradle-config.
|
// For more information, see: https://flutter.dev/to/review-gradle-config.
|
||||||
minSdk = flutter.minSdkVersion
|
minSdk = flutter.minSdkVersion
|
||||||
@@ -30,15 +45,22 @@ android {
|
|||||||
versionName = flutter.versionName
|
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 {
|
buildTypes {
|
||||||
release {
|
release {
|
||||||
// TODO: Add your own signing config for the release build.
|
signingConfig signingConfigs.release // Use the release signing config
|
||||||
// Signing with the debug keys for now, so `flutter run --release` works.
|
|
||||||
signingConfig = signingConfigs.debug
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
flutter {
|
flutter {
|
||||||
source = "../.."
|
source = "../.."
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user