build.gradle 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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. def flutterRoot = localProperties.getProperty('flutter.sdk')
  9. if (flutterRoot == null) {
  10. throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
  11. }
  12. apply plugin: 'com.android.application'
  13. apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
  14. android {
  15. compileSdkVersion 27
  16. lintOptions {
  17. disable 'InvalidPackage'
  18. }
  19. defaultConfig {
  20. testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
  21. // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
  22. applicationId "com.yourcompany.flutter_webview_plugin_example"
  23. }
  24. buildTypes {
  25. release {
  26. // TODO: Add your own signing config for the release build.
  27. // Signing with the debug keys for now, so `flutter run --release` works.
  28. signingConfig signingConfigs.debug
  29. }
  30. }
  31. }
  32. flutter {
  33. source '../..'
  34. }
  35. dependencies {
  36. androidTestImplementation 'com.android.support:support-annotations:27.0.0'
  37. androidTestImplementation 'com.android.support.test:runner:1.0.2'
  38. androidTestImplementation 'com.android.support.test:rules:1.0.2'
  39. }