build.gradle 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. group 'com.umeng.umeng_common_sdk'
  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. maven { url 'https://repo1.maven.org/maven2/'}
  27. }
  28. dependencies {
  29. classpath 'com.android.tools.build:gradle:3.5.0'
  30. }
  31. }
  32. rootProject.allprojects {
  33. repositories {
  34. google()
  35. jcenter()
  36. maven { url 'https://repo1.maven.org/maven2/'}
  37. }
  38. }
  39. apply plugin: 'com.android.library'
  40. android {
  41. compileSdkVersion 29
  42. defaultConfig {
  43. minSdkVersion 16
  44. }
  45. lintOptions {
  46. disable 'InvalidPackage'
  47. }
  48. }
  49. dependencies {
  50. api 'com.umeng.umsdk:common:9.4.4'// 必选
  51. api 'com.umeng.umsdk:asms:1.4.1'// 必选
  52. api 'com.umeng.umsdk:apm:1.5.2'
  53. compileOnly files("$flutterRoot/bin/cache/artifacts/engine/android-arm64/flutter.jar")
  54. compileOnly "androidx.annotation:annotation:1.1.0"
  55. }