diff --git a/.DS_Store b/.DS_Store index 6b3bc2f..5db0715 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/android/app/build.gradle.kts b/android/app/build.gradle.kts index a8437fb..9f7cf93 100644 --- a/android/app/build.gradle.kts +++ b/android/app/build.gradle.kts @@ -8,6 +8,17 @@ plugins { id("dev.flutter.flutter-gradle-plugin") } +// 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)) +} + android { namespace = "com.amastra.tetraq" compileSdk = flutter.compileSdkVersion @@ -18,8 +29,11 @@ android { targetCompatibility = JavaVersion.VERSION_17 } - kotlinOptions { - jvmTarget = JavaVersion.VERSION_17.toString() + // Sintassi aggiornata come richiesto dal compilatore Kotlin + kotlin { + compilerOptions { + jvmTarget.set(org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17) + } } defaultConfig { @@ -33,15 +47,28 @@ android { versionName = flutter.versionName } + // 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") + } + } + buildTypes { - release { + getByName("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") + // Ora usiamo la chiave di release appena creata + signingConfig = signingConfigs.getByName("release") } } } flutter { source = "../.." -} +} \ No newline at end of file