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