build.gradle 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. group 'org.leanflutter.plugins.flutter_qiyu'
  2. version '1.0'
  3. buildscript {
  4. repositories {
  5. google()
  6. mavenCentral()
  7. }
  8. dependencies {
  9. classpath 'com.android.tools.build:gradle:7.3.0'
  10. }
  11. }
  12. rootProject.allprojects {
  13. repositories {
  14. google()
  15. mavenCentral()
  16. }
  17. }
  18. // 加载 local.properties 文件
  19. def localProperties = new Properties()
  20. def localPropertiesFile = rootProject.file('local.properties')
  21. if (localPropertiesFile.exists()) {
  22. localPropertiesFile.withInputStream { stream ->
  23. localProperties.load(stream)
  24. }
  25. }
  26. // 读取变量
  27. def flutterSdk = localProperties.getProperty('flutter.sdk')
  28. apply plugin: 'com.android.library'
  29. android {
  30. compileSdkVersion 31
  31. compileOptions {
  32. sourceCompatibility JavaVersion.VERSION_1_8
  33. targetCompatibility JavaVersion.VERSION_1_8
  34. }
  35. defaultConfig {
  36. minSdkVersion 16
  37. }
  38. lintOptions {
  39. disable 'InvalidPackage'
  40. }
  41. }
  42. dependencies {
  43. //flutter
  44. compileOnly files("$flutterSdk/bin/cache/artifacts/engine/android-arm/flutter.jar")
  45. //AndroidX
  46. compileOnly "androidx.annotation:annotation:1.1.0"
  47. compileOnly 'androidx.activity:activity:1.6.1'
  48. implementation "androidx.constraintlayout:constraintlayout:2.1.1"
  49. implementation 'com.qiyukf.unicorn:unicorn:+'
  50. implementation 'com.github.bumptech.glide:glide:4.10.0'
  51. // annotationProcessor 'com.github.bumptech.glide:compiler:4.10.0'
  52. // implementation 'com.github.getActivity:XXPermissions:20.0'
  53. }