plugins { id "com.android.application" id "org.jetbrains.kotlin.android" id "dev.flutter.flutter-gradle-plugin" } def localProperties = new Properties() def localPropertiesFile = rootProject.file("local.properties") if (localPropertiesFile.exists()) { localPropertiesFile.withReader("UTF-8") { reader -> localProperties.load(reader) } } def flutterVersionCode = localProperties.getProperty("flutter.versionCode") ?: "1" def flutterVersionName = localProperties.getProperty("flutter.versionName") ?: "1.0" android { namespace "com.example.idrocap" // <- cambia col tuo package se serve compileSdk 36 ndkVersion flutter.ndkVersion defaultConfig { applicationId "com.example.idrocap" // <- cambia col tuo package se serve minSdkVersion 31 targetSdk 36 versionCode flutterVersionCode.toInteger() versionName flutterVersionName multiDexEnabled true } buildTypes { debug { // Evita il problema: niente shrink risorse in debug shrinkResources false minifyEnabled false } release { // Se vuoi usare shrinkResources, devi mettere minifyEnabled true e gestire ProGuard/R8. // Per ora lo disattiviamo per sbloccare la build. shrinkResources false minifyEnabled false proguardFiles getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro" signingConfig signingConfigs.debug // metti la tua release quando pronta } } compileOptions { sourceCompatibility JavaVersion.VERSION_17 targetCompatibility JavaVersion.VERSION_17 } kotlinOptions { jvmTarget = "17" // Con Kotlin 2.1.0 di solito non serve questo flag, ma tenerlo รจ harmless: freeCompilerArgs += ["-Xjvm-default=all"] } sourceSets { main.java.srcDirs += "src/main/kotlin" } packaging { resources { excludes += [ "META-INF/DEPENDENCIES", "META-INF/LICENSE", "META-INF/LICENSE.txt", "META-INF/license.txt", "META-INF/NOTICE", "META-INF/NOTICE.txt", "META-INF/notice.txt", "META-INF/ASL2.0" ] } } } flutter { source "../.." } dependencies { // Allineata alla versione del plugin Kotlin implementation "org.jetbrains.kotlin:kotlin-stdlib:2.1.0" }