• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1def localProperties = new Properties()
2def localPropertiesFile = rootProject.file('local.properties')
3if (localPropertiesFile.exists()) {
4    localPropertiesFile.withReader('UTF-8') { reader ->
5        localProperties.load(reader)
6    }
7}
8
9def flutterRoot = localProperties.getProperty('flutter.sdk')
10if (flutterRoot == null) {
11    throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
12}
13
14def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
15if (flutterVersionCode == null) {
16    flutterVersionCode = '1'
17}
18
19def flutterVersionName = localProperties.getProperty('flutter.versionName')
20if (flutterVersionName == null) {
21    flutterVersionName = '1.0'
22}
23
24apply plugin: 'com.android.application'
25apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
26
27android {
28    compileSdkVersion 28
29
30    lintOptions {
31        disable 'InvalidPackage'
32    }
33
34    defaultConfig {
35        // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
36        applicationId "com.softmotions.ejdb2_example"
37        minSdkVersion 16
38        targetSdkVersion 28
39        versionCode flutterVersionCode.toInteger()
40        versionName flutterVersionName
41        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
42    }
43
44    buildTypes {
45        release {
46            // TODO: Add your own signing config for the release build.
47            // Signing with the debug keys for now, so `flutter run --release` works.
48            signingConfig signingConfigs.debug
49        }
50    }
51}
52
53flutter {
54    source '../..'
55}
56
57dependencies {
58    testImplementation 'junit:junit:4.12'
59    androidTestImplementation 'androidx.test:runner:1.1.1'
60    androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
61}
62