|
| 1 | +import java.util.Properties |
| 2 | +import java.io.FileInputStream |
| 3 | + |
| 4 | +plugins { |
| 5 | + id("com.android.application") |
| 6 | + id("kotlin-android") |
| 7 | + // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins. |
| 8 | + id("dev.flutter.flutter-gradle-plugin") |
| 9 | +} |
| 10 | + |
| 11 | +// https://docs.flutter.dev/deployment/android#configure-signing-in-gradle |
| 12 | +val keystoreProperties = Properties() |
| 13 | +val keystorePropertiesFile = rootProject.file("key.properties") |
| 14 | +if (keystorePropertiesFile.exists()) { |
| 15 | + keystoreProperties.load(FileInputStream(keystorePropertiesFile)) |
| 16 | +} |
| 17 | + |
| 18 | +android { |
| 19 | + namespace = "com.remi.piwigo_ng" |
| 20 | + //compileSdkVersion flutter.compileSdkVersion |
| 21 | + //ndkVersion = flutter.ndkVersion |
| 22 | + compileSdk = 36 |
| 23 | + ndkVersion = "29.0.13599879" |
| 24 | + |
| 25 | + compileOptions { |
| 26 | + // Flag to enable support for the new language APIs |
| 27 | + isCoreLibraryDesugaringEnabled = true |
| 28 | + // Sets Java compatibility to Java 17 |
| 29 | + sourceCompatibility = JavaVersion.VERSION_17 |
| 30 | + targetCompatibility = JavaVersion.VERSION_17 |
| 31 | + } |
| 32 | + |
| 33 | + kotlinOptions { |
| 34 | + jvmTarget = JavaVersion.VERSION_17.toString() |
| 35 | + } |
| 36 | + |
| 37 | + defaultConfig { |
| 38 | + applicationId = "com.piwigo.piwigo_ng" |
| 39 | + multiDexEnabled = true |
| 40 | + minSdk = 26 |
| 41 | + targetSdk = 36 |
| 42 | + versionCode = flutter.versionCode |
| 43 | + versionName = flutter.versionName |
| 44 | + } |
| 45 | + |
| 46 | + signingConfigs { |
| 47 | + create("release") { |
| 48 | + keyAlias = keystoreProperties["keyAlias"] as String |
| 49 | + keyPassword = keystoreProperties["keyPassword"] as String |
| 50 | + storeFile = keystoreProperties["storeFile"]?.let { file(it) } |
| 51 | + storePassword = keystoreProperties["storePassword"] as String |
| 52 | + } |
| 53 | + } |
| 54 | + |
| 55 | + buildTypes { |
| 56 | + release { |
| 57 | + signingConfig = signingConfigs.getByName("release") |
| 58 | + } |
| 59 | + } |
| 60 | +} |
| 61 | + |
| 62 | +flutter { |
| 63 | + source = "../.." |
| 64 | +} |
| 65 | + |
| 66 | +dependencies { |
| 67 | + implementation("androidx.window:window:1.4.0") |
| 68 | + coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.1.5") |
| 69 | +} |
0 commit comments