From 37e59d565272809e4a73518b60162462730a38a2 Mon Sep 17 00:00:00 2001 From: Paolo Date: Thu, 5 Mar 2026 20:00:01 +0100 Subject: [PATCH] Auto-sync: 20260305_200000 --- .DS_Store | Bin 10244 -> 10244 bytes android/app/build.gradle.kts | 39 +++++++++++++++++++++++++++++------ 2 files changed, 33 insertions(+), 6 deletions(-) diff --git a/.DS_Store b/.DS_Store index 6b3bc2fce57827666b2b50cb7b489aa0c4ad832d..5db0715e07048b1ed50c3e9dee135a708eca16ba 100644 GIT binary patch delta 14 VcmZn(XbITxS%{Hw^A{ljQ2;Es1wH@( delta 14 VcmZn(XbITxS%{Hg^A{ljQ2;Em1w8-& 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