build.gradle 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. group = "com.atmob.keyboard_android"
  2. version = "1.0-SNAPSHOT"
  3. // 加载 local.properties 文件
  4. // 需要在 local.properties 文件中配置你的flutter的sdk目录,例如:flutter.sdk=C\:\\Users\\XM20240809\\fvm\\versions\\3.29.2
  5. def localProperties = new Properties()
  6. def localPropertiesFile = rootProject.file('local.properties')
  7. if (localPropertiesFile.exists()) {
  8. localPropertiesFile.withInputStream { stream ->
  9. localProperties.load(stream)
  10. }
  11. }
  12. // 读取变量
  13. def flutterSdk = localProperties.getProperty('flutter.sdk')
  14. buildscript {
  15. ext.kotlin_version = "1.8.22"
  16. repositories {
  17. maven { url 'https://jitpack.io' }
  18. google()
  19. mavenCentral()
  20. }
  21. dependencies {
  22. classpath("com.android.tools.build:gradle:8.7.0")
  23. classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version")
  24. }
  25. }
  26. allprojects {
  27. repositories {
  28. maven { url 'https://jitpack.io' }
  29. google()
  30. mavenCentral()
  31. }
  32. }
  33. apply plugin: "com.android.library"
  34. apply plugin: "kotlin-android"
  35. android {
  36. namespace = "com.atmob.keyboard_android"
  37. compileSdk = 35
  38. compileOptions {
  39. sourceCompatibility = JavaVersion.VERSION_11
  40. targetCompatibility = JavaVersion.VERSION_11
  41. }
  42. kotlinOptions {
  43. jvmTarget = JavaVersion.VERSION_11
  44. }
  45. sourceSets {
  46. main.java.srcDirs += "src/main/kotlin"
  47. test.java.srcDirs += "src/test/kotlin"
  48. }
  49. defaultConfig {
  50. minSdk = 21
  51. }
  52. def glide_version = '4.13.2'
  53. dependencies {
  54. testImplementation("org.jetbrains.kotlin:kotlin-test")
  55. testImplementation("org.mockito:mockito-core:5.0.0")
  56. compileOnly(files("$flutterSdk/bin/cache/artifacts/engine/android-arm/flutter.jar"))
  57. // AppCompat
  58. implementation 'androidx.appcompat:appcompat:1.3.1'
  59. // Material
  60. implementation 'com.google.android.material:material:1.4.0'
  61. // RecyclerView
  62. implementation 'androidx.recyclerview:recyclerview:1.3.0'
  63. // ConstraintLayout
  64. implementation "androidx.constraintlayout:constraintlayout:2.1.4"
  65. // 让Service支持Jetpack Lifecycle组件
  66. implementation "androidx.lifecycle:lifecycle-service:2.6.1"
  67. // Gson
  68. implementation "com.google.code.gson:gson:2.10"
  69. // CircleImageView
  70. implementation 'de.hdodenhof:circleimageview:3.1.0'
  71. // XPopup
  72. // implementation 'com.github.li-xiaojun:XPopup:2.10.0'
  73. // Android Util Code
  74. implementation 'com.blankj:utilcodex:1.31.1'
  75. // RecyclerView Adapter
  76. implementation 'me.drakeet.multitype:multitype:3.5.0'
  77. // OkHttp3
  78. implementation 'com.squareup.okhttp3:okhttp:3.12.0'
  79. // Glide
  80. implementation "com.github.bumptech.glide:glide:$glide_version"
  81. implementation "jp.wasabeef:glide-transformations:4.3.0"
  82. implementation "com.github.zjupure:webpdecoder:2.1.${glide_version}"
  83. // MagicIndicator ViewPager指示器
  84. implementation 'com.github.hackware1993:MagicIndicator:1.7.0'
  85. }
  86. testOptions {
  87. unitTests.all {
  88. useJUnitPlatform()
  89. testLogging {
  90. events "passed", "skipped", "failed", "standardOut", "standardError"
  91. outputs.upToDateWhen { false }
  92. showStandardStreams = true
  93. }
  94. }
  95. }
  96. }