2026-02-27 23:35:54 +01:00
|
|
|
plugins {
|
|
|
|
|
id("com.android.application")
|
|
|
|
|
// START: FlutterFire Configuration
|
|
|
|
|
id("com.google.gms.google-services")
|
|
|
|
|
// END: FlutterFire Configuration
|
|
|
|
|
id("kotlin-android")
|
|
|
|
|
// The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
|
|
|
|
|
id("dev.flutter.flutter-gradle-plugin")
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-05 20:00:01 +01:00
|
|
|
// Aggiungiamo esplicitamente gli import richiesti da Kotlin
|
|
|
|
|
import java.io.FileInputStream
|
|
|
|
|
import java.util.Properties
|
|
|
|
|
|
|
|
|
|
// Carichiamo il file con le password
|
|
|
|
|
val keystoreProperties = Properties()
|
|
|
|
|
val keystorePropertiesFile = rootProject.file("key.properties")
|
|
|
|
|
if (keystorePropertiesFile.exists()) {
|
|
|
|
|
keystoreProperties.load(FileInputStream(keystorePropertiesFile))
|
|
|
|
|
}
|
|
|
|
|
|
2026-02-27 23:35:54 +01:00
|
|
|
android {
|
2026-03-05 15:00:00 +01:00
|
|
|
namespace = "com.amastra.tetraq"
|
2026-02-27 23:35:54 +01:00
|
|
|
compileSdk = flutter.compileSdkVersion
|
|
|
|
|
ndkVersion = flutter.ndkVersion
|
|
|
|
|
|
|
|
|
|
compileOptions {
|
|
|
|
|
sourceCompatibility = JavaVersion.VERSION_17
|
|
|
|
|
targetCompatibility = JavaVersion.VERSION_17
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-05 20:00:01 +01:00
|
|
|
// Sintassi aggiornata come richiesto dal compilatore Kotlin
|
|
|
|
|
kotlin {
|
|
|
|
|
compilerOptions {
|
|
|
|
|
jvmTarget.set(org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17)
|
|
|
|
|
}
|
2026-02-27 23:35:54 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
defaultConfig {
|
|
|
|
|
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
|
2026-03-05 15:00:00 +01:00
|
|
|
applicationId = "com.amastra.tetraq"
|
2026-02-27 23:35:54 +01:00
|
|
|
// 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
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-05 20:00:01 +01:00
|
|
|
// Aggiunto il blocco per la firma in formato Kotlin DSL
|
|
|
|
|
signingConfigs {
|
|
|
|
|
create("release") {
|
|
|
|
|
keyAlias = keystoreProperties.getProperty("keyAlias")
|
|
|
|
|
keyPassword = keystoreProperties.getProperty("keyPassword")
|
|
|
|
|
val storeFileString = keystoreProperties.getProperty("storeFile")
|
|
|
|
|
if (storeFileString != null) {
|
|
|
|
|
storeFile = file(storeFileString)
|
|
|
|
|
}
|
|
|
|
|
storePassword = keystoreProperties.getProperty("storePassword")
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2026-02-27 23:35:54 +01:00
|
|
|
buildTypes {
|
2026-03-05 20:00:01 +01:00
|
|
|
getByName("release") {
|
2026-02-27 23:35:54 +01:00
|
|
|
// TODO: Add your own signing config for the release build.
|
2026-03-05 20:00:01 +01:00
|
|
|
// Ora usiamo la chiave di release appena creata
|
|
|
|
|
signingConfig = signingConfigs.getByName("release")
|
2026-02-27 23:35:54 +01:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
flutter {
|
|
|
|
|
source = "../.."
|
2026-03-05 20:00:01 +01:00
|
|
|
}
|