google preperation 1

This commit is contained in:
2026-10-26 20:48:16 +01:00
parent 9a65ff7ad4
commit 3b50cb0fe9
47 changed files with 4969 additions and 4580 deletions
+31 -5
View File
@@ -1,3 +1,6 @@
import java.util.Properties
import java.io.FileInputStream
plugins {
id("com.android.application")
id("kotlin-android")
@@ -5,8 +8,15 @@ plugins {
id("dev.flutter.flutter-gradle-plugin")
}
// Upload key for Google Play. android/key.properties is gitignored — never commit it.
val keystoreProperties = Properties()
val keystorePropertiesFile = rootProject.file("key.properties")
if (keystorePropertiesFile.exists()) {
keystoreProperties.load(FileInputStream(keystorePropertiesFile))
}
android {
namespace = "com.example.shooter_app"
namespace = "si.sdkkovinar.app"
compileSdk = flutter.compileSdkVersion
ndkVersion = "27.0.12077973" // ✅ Keep only this line
@@ -22,16 +32,32 @@ android {
}
defaultConfig {
applicationId = "com.example.shooter_app"
minSdk = 26
targetSdk = 33
applicationId = "si.sdkkovinar.app"
minSdk = 26
targetSdk = 36
versionCode = flutter.versionCode
versionName = flutter.versionName
}
signingConfigs {
create("release") {
if (keystorePropertiesFile.exists()) {
keyAlias = keystoreProperties["keyAlias"] as String
keyPassword = keystoreProperties["keyPassword"] as String
storeFile = file(keystoreProperties["storeFile"] as String)
storePassword = keystoreProperties["storePassword"] as String
}
}
}
buildTypes {
release {
signingConfig = signingConfigs.getByName("debug")
// Falls back to debug key only when key.properties is missing (local testing).
signingConfig = if (keystorePropertiesFile.exists()) {
signingConfigs.getByName("release")
} else {
signingConfigs.getByName("debug")
}
isMinifyEnabled = false
isShrinkResources = false
}