build.gradle 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. group 'com.amap.flutter.amap_flutter_map'
  2. version '1.0'
  3. def localProperties = new Properties()
  4. def localPropertiesFile = rootProject.file('local.properties')
  5. if (localPropertiesFile.exists()) {
  6. localPropertiesFile.withReader('UTF-8') { reader ->
  7. localProperties.load(reader)
  8. }
  9. }
  10. def flutterRoot = localProperties.getProperty('flutter.sdk')
  11. if (flutterRoot == null) {
  12. throw new Exception("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
  13. }
  14. def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
  15. if (flutterVersionCode == null) {
  16. flutterVersionCode = '1'
  17. }
  18. def flutterVersionName = localProperties.getProperty('flutter.versionName')
  19. if (flutterVersionName == null) {
  20. flutterVersionName = '1.0'
  21. }
  22. buildscript {
  23. repositories {
  24. google()
  25. jcenter()
  26. }
  27. dependencies {
  28. classpath 'com.android.tools.build:gradle:3.5.0'
  29. }
  30. }
  31. rootProject.allprojects {
  32. repositories {
  33. google()
  34. jcenter()
  35. }
  36. }
  37. apply plugin: 'com.android.library'
  38. android {
  39. compileSdkVersion 29
  40. defaultConfig {
  41. minSdkVersion 16
  42. }
  43. lintOptions {
  44. disable 'InvalidPackage'
  45. }
  46. }
  47. dependencies {
  48. compileOnly "androidx.annotation:annotation:1.1.0"
  49. compileOnly files("$flutterRoot/bin/cache/artifacts/engine/android-arm64/flutter.jar")
  50. implementation 'com.amap.api:3dmap:8.1.0'
  51. }