import java.util.Properties plugins { id("com.android.application") // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins. id("dev.flutter.flutter-gradle-plugin") } val signingProperties = Properties() val signingFile = rootProject.file("key.properties") if (signingFile.exists()) signingFile.inputStream().use { signingProperties.load(it) } android { namespace = "eu.chj.sm_mobile" compileSdk = flutter.compileSdkVersion ndkVersion = flutter.ndkVersion compileOptions { sourceCompatibility = JavaVersion.VERSION_17 targetCompatibility = JavaVersion.VERSION_17 } defaultConfig { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). applicationId = "eu.chj.sm_mobile" // You can update the following values to match your application needs. // For more information, see: https://flutter.dev/to/review-gradle-config. minSdk = 30 targetSdk = flutter.targetSdkVersion // Uses the version code from pubspec.yaml. When using split APKs, 1000 * ABI_VERSION // is added automatically by Flutter. (https://developer.android.com/studio/build/configure-apk-splits#configure-APK-versions) // You can force using the value of versionCode by specifying the `-P force-version-code-ignoring-abi=true` // flag during build. versionCode = flutter.versionCode versionName = flutter.versionName } signingConfigs { if (signingFile.exists()) create("release") { keyAlias = signingProperties["keyAlias"] as String keyPassword = signingProperties["keyPassword"] as String storeFile = file(signingProperties["storeFile"] as String) storePassword = signingProperties["storePassword"] as String } } buildTypes { release { if (signingFile.exists()) signingConfig = signingConfigs.getByName("release") } } } kotlin { compilerOptions { jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17 } } flutter { source = "../.." } dependencies { // FileProvider for the system viewer and the activity result API. implementation("androidx.core:core-ktx:1.16.0") implementation("androidx.activity:activity-ktx:1.10.1") implementation("androidx.fragment:fragment-ktx:1.8.8") }