plugins { id 'com.android.application' id '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) } } // Release signing is opt-in: only load key.properties if it exists. Without it // (CI analyze/test jobs, contributors) builds fall back to debug signing. def keystorePropertiesFile = rootProject.file("key.properties") def keystoreProperties = new Properties() def hasReleaseKeystore = keystorePropertiesFile.exists() if (hasReleaseKeystore) { keystoreProperties.load(new FileInputStream(keystorePropertiesFile)) } android { compileSdkVersion 36 namespace "org.comunes.fires" lintOptions { disable 'InvalidPackage' } defaultConfig { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). applicationId "org.comunes.fires" minSdkVersion flutter.minSdkVersion targetSdkVersion 36 // versionCode/versionName come from pubspec.yaml (version: X.Y.Z+CODE) // so a `v*` git tag maps the release version, matching the tane flow. versionCode flutter.versionCode versionName flutter.versionName testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } signingConfigs { if (hasReleaseKeystore) { release { keyAlias keystoreProperties['keyAlias'] keyPassword keystoreProperties['keyPassword'] storeFile file(keystoreProperties['storeFile']) storePassword keystoreProperties['storePassword'] } } } buildTypes { release { // Sign with the release key when available, else debug (contributors/CI). signingConfig hasReleaseKeystore ? signingConfigs.release : signingConfigs.debug minifyEnabled true shrinkResources true proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } flavorDimensions "flavor-type" productFlavors { development { dimension "flavor-type" applicationIdSuffix ".dev" versionNameSuffix "-dev" } production { dimension "flavor-type" } } } flutter { source '../..' } dependencies { testImplementation 'junit:junit:4.13.2' // androidx test dependencies replace old android.support.test androidTestImplementation 'androidx.test:runner:1.5.2' androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1' // implementation 'com.google.firebase:firebase-core:15.0.2' // google recommends 16 but fails because location flutter package deps in 15 } apply plugin: 'com.google.gms.google-services'