build.gradle 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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. }
  27. }
  28. apply plugin: 'com.android.library'
  29. android {
  30. compileSdkVersion 28
  31. defaultConfig {
  32. testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
  33. // NOTE(jeffmikels): When targetSdkVersion or minSdkVersion is not set or < 4, gradle adds
  34. // additional scary permissions such as WRITE_EXTERNAL_STORAGE and READ_PHONE_STATE.
  35. minSdkVersion 16
  36. }
  37. lintOptions {
  38. disable 'InvalidPackage'
  39. }
  40. }
  41. dependencies {
  42. implementation group: 'androidx.appcompat', name: 'appcompat', version: '1.0.0'
  43. }