Michael Thomsen | 8da4778 | 2017-02-15 17:13:10 +0100 | [diff] [blame^] | 1 | def localProperties = new Properties() |
| 2 | def localPropertiesFile = rootProject.file('local.properties') |
| 3 | if (localPropertiesFile.exists()) { |
| 4 | localPropertiesFile.withInputStream { stream -> |
| 5 | localProperties.load(stream) |
| 6 | } |
| 7 | } |
| 8 | |
| 9 | def flutterRoot = localProperties.getProperty('flutter.sdk') |
| 10 | if (flutterRoot == null) { |
| 11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") |
| 12 | } |
| 13 | |
| 14 | apply plugin: 'com.android.application' |
| 15 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" |
| 16 | |
| 17 | android { |
| 18 | compileSdkVersion 25 |
| 19 | buildToolsVersion '24.0.1' |
| 20 | |
| 21 | lintOptions { |
| 22 | disable 'InvalidPackage' |
| 23 | } |
| 24 | |
| 25 | defaultConfig { |
| 26 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" |
| 27 | } |
| 28 | |
| 29 | buildTypes { |
| 30 | release { |
| 31 | // TODO: Add your own signing config for the release build. |
| 32 | // Signing with the debug keys for now, so `flutter run --release` works. |
| 33 | signingConfig signingConfigs.debug |
| 34 | } |
| 35 | } |
| 36 | } |
| 37 | |
| 38 | flutter { |
| 39 | source '../..' |
| 40 | } |
| 41 | |
| 42 | dependencies { |
| 43 | androidTestCompile 'com.android.support:support-annotations:25.0.0' |
| 44 | androidTestCompile 'com.android.support.test:runner:0.5' |
| 45 | androidTestCompile 'com.android.support.test:rules:0.5' |
| 46 | } |