|
| 1 | +// Copyright 2013 The Flutter Authors |
| 2 | +// Use of this source code is governed by a BSD-style license that can be |
| 3 | +// found in the LICENSE file. |
| 4 | + |
| 5 | +plugins { |
| 6 | + id "com.android.application" |
| 7 | + id "dev.flutter.flutter-gradle-plugin" |
| 8 | +} |
| 9 | + |
| 10 | +def localProperties = new Properties() |
| 11 | +def localPropertiesFile = rootProject.file('local.properties') |
| 12 | +if (localPropertiesFile.exists()) { |
| 13 | + localPropertiesFile.withReader('UTF-8') { reader -> |
| 14 | + localProperties.load(reader) |
| 15 | + } |
| 16 | +} |
| 17 | + |
| 18 | +def flutterVersionCode = localProperties.getProperty('flutter.versionCode') |
| 19 | +if (flutterVersionCode == null) { |
| 20 | + flutterVersionCode = '1' |
| 21 | +} |
| 22 | + |
| 23 | +def flutterVersionName = localProperties.getProperty('flutter.versionName') |
| 24 | +if (flutterVersionName == null) { |
| 25 | + flutterVersionName = '1.0' |
| 26 | +} |
| 27 | + |
| 28 | +def keystoreProperties = new Properties() |
| 29 | +def keystorePropertiesFile = rootProject.file('key.properties') |
| 30 | +if (keystorePropertiesFile.exists()) { |
| 31 | + keystoreProperties.load(new FileInputStream(keystorePropertiesFile)) |
| 32 | +} |
| 33 | + |
| 34 | +android { |
| 35 | + namespace = "com.example.a11y_assessments" |
| 36 | + compileSdk = flutter.compileSdkVersion |
| 37 | + ndkVersion = flutter.ndkVersion |
| 38 | + |
| 39 | + compileOptions { |
| 40 | + sourceCompatibility = JavaVersion.VERSION_17 |
| 41 | + targetCompatibility = JavaVersion.VERSION_17 |
| 42 | + } |
| 43 | + |
| 44 | + sourceSets { |
| 45 | + main.java.srcDirs += 'src/main/kotlin' |
| 46 | + } |
| 47 | + |
| 48 | + defaultConfig { |
| 49 | + // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). |
| 50 | + applicationId "dev.flutter.a11yassessments" |
| 51 | + // You can update the following values to match your application needs. |
| 52 | + // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration. |
| 53 | + minSdk = flutter.minSdkVersion |
| 54 | + targetSdk = flutter.targetSdkVersion |
| 55 | + versionCode = flutterVersionCode.toInteger() |
| 56 | + versionName = flutterVersionName |
| 57 | + } |
| 58 | + signingConfigs { |
| 59 | + release { |
| 60 | + keyAlias keystoreProperties['keyAlias'] |
| 61 | + keyPassword keystoreProperties['keyPassword'] |
| 62 | + storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null |
| 63 | + storePassword keystoreProperties['storePassword'] |
| 64 | + } |
| 65 | + } |
| 66 | + |
| 67 | + buildTypes { |
| 68 | + release { |
| 69 | + // TODO: Add your own signing config for the release build. |
| 70 | + // Signing with the debug keys for now, so `flutter run --release` works. |
| 71 | + signingConfig = signingConfigs.release |
| 72 | + } |
| 73 | + } |
| 74 | +} |
| 75 | + |
| 76 | +kotlin { |
| 77 | + compilerOptions { |
| 78 | + jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17 |
| 79 | + } |
| 80 | +} |
| 81 | + |
| 82 | +flutter { |
| 83 | + source = '../..' |
| 84 | +} |
| 85 | + |
| 86 | +dependencies {} |
0 commit comments