1def localProperties = new Properties() 2def localPropertiesFile = rootProject.file('local.properties') 3if (localPropertiesFile.exists()) { 4 localPropertiesFile.withInputStream { stream -> 5 localProperties.load(stream) 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 14apply plugin: 'com.android.application' 15apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 16 17android { 18 compileSdkVersion 28 19 20 lintOptions { 21 disable 'InvalidPackage' 22 } 23 24 defaultConfig { 25 minSdkVersion 16 26 targetSdkVersion 28 27 versionCode 1 28 versionName "0.0.1" 29 testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 30 } 31 32 buildTypes { 33 release { 34 // TODO: Add your own signing config for the release build. 35 // Signing with the debug keys for now, so `flutter run --release` works. 36 signingConfig signingConfigs.debug 37 } 38 } 39 40 aaptOptions { 41 // TODO(goderbauer): remove when https://github.com/flutter/flutter/issues/8986 is resolved. 42 if(System.getenv("FLUTTER_CI_WIN")) { 43 println "AAPT cruncher disabled when running on Win CI." 44 cruncherEnabled false 45 } 46 } 47} 48 49flutter { 50 source '../..' 51} 52 53dependencies { 54 testImplementation 'junit:junit:4.12' 55 androidTestImplementation 'com.android.support.test:runner:1.0.2' 56 androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' 57} 58