build.gradle 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. group 'com.flutter_webview_plugin'
  2. version '1.0-SNAPSHOT'
  3. def ANDROIDX_WARNING = "flutterPluginsAndroidXWarning";
  4. gradle.buildFinished { buildResult ->
  5. if (buildResult.failure && !rootProject.ext.has(ANDROIDX_WARNING)) {
  6. println ' *********************************************************'
  7. println 'WARNING: This version of flutter_webview_plugin will break your Android build if it or its dependencies aren\'t compatible with AndroidX.'
  8. println ' See https://goo.gl/CP92wY for more information on the problem and how to fix it.'
  9. println ' This warning prints for all Android build failures. The real root cause of the error may be unrelated.'
  10. println ' *********************************************************'
  11. rootProject.ext.set(ANDROIDX_WARNING, true);
  12. }
  13. }
  14. buildscript {
  15. repositories {
  16. google()
  17. jcenter()
  18. }
  19. dependencies {
  20. classpath 'com.android.tools.build:gradle:3.3.2'
  21. }
  22. }
  23. allprojects {
  24. repositories {
  25. jcenter()
  26. google()
  27. }
  28. }
  29. apply plugin: 'com.android.library'
  30. android {
  31. compileSdkVersion 28
  32. defaultConfig {
  33. testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
  34. // NOTE(jeffmikels): When targetSdkVersion or minSdkVersion is not set or < 4, gradle adds
  35. // additional scary permissions such as WRITE_EXTERNAL_STORAGE and READ_PHONE_STATE.
  36. minSdkVersion 16
  37. }
  38. lintOptions {
  39. disable 'InvalidPackage'
  40. }
  41. }
  42. dependencies {
  43. implementation group: 'androidx.appcompat', name: 'appcompat', version: '1.0.0'
  44. }