build.gradle 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  1. apply plugin: 'com.android.application'
  2. apply plugin: 'kotlin-android'
  3. apply plugin: 'kotlin-android-extensions'
  4. apply plugin: 'kotlin-kapt'
  5. apply plugin: 'org.jetbrains.kotlin.plugin.serialization'
  6. def CORE_VERSION = "1.2.1"
  7. def LUAMIRAI_VERSION = "0.5.0"
  8. android {
  9. compileSdkVersion 29
  10. buildToolsVersion "29.0.2"
  11. defaultConfig {
  12. applicationId "io.github.mzdluo123.mirai.android"
  13. minSdkVersion 21
  14. targetSdkVersion 29
  15. versionCode 30
  16. versionName "2.10.3"
  17. testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
  18. buildConfigField("String", "COREVERSION", "\"$CORE_VERSION\"")
  19. buildConfigField("String", "LUAMIRAI_VERSION", "\"$LUAMIRAI_VERSION\"")
  20. }
  21. buildFeatures {
  22. dataBinding = true
  23. }
  24. buildTypes {
  25. release {
  26. minifyEnabled false
  27. shrinkResources false
  28. proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
  29. }
  30. debug{
  31. minifyEnabled false
  32. shrinkResources false
  33. proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
  34. }
  35. }
  36. // To inline the bytecode built with JVM target 1.8 into
  37. // bytecode that is being built with JVM target 1.6. (e.g. navArgs)
  38. compileOptions {
  39. sourceCompatibility JavaVersion.VERSION_1_8
  40. targetCompatibility JavaVersion.VERSION_1_8
  41. }
  42. kotlinOptions {
  43. jvmTarget = "1.8"
  44. }
  45. packagingOptions {
  46. exclude 'META-INF/DEPENDENCIES'
  47. exclude 'META-INF/LICENSE'
  48. exclude 'META-INF/LICENSE.txt'
  49. exclude 'META-INF/license.txt'
  50. exclude 'META-INF/NOTICE'
  51. exclude 'META-INF/NOTICE.txt'
  52. exclude 'META-INF/notice.txt'
  53. exclude 'META-INF/ASL2.0'
  54. exclude("META-INF/*.kotlin_module")
  55. }
  56. lintOptions {
  57. abortOnError false
  58. }
  59. testOptions {
  60. animationsDisabled = true
  61. }
  62. }
  63. dependencies {
  64. implementation (fileTree(dir: 'libs', include: ['*.jar']))
  65. implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
  66. implementation 'com.google.android.material:material:1.2.0'
  67. //androidx-core-ktx
  68. implementation 'androidx.core:core-ktx:1.3.1'
  69. //androidx-appcompat
  70. implementation 'androidx.appcompat:appcompat:1.1.0'
  71. //androidx-legacy
  72. implementation 'androidx.legacy:legacy-support-v4:1.0.0'
  73. //androidx-constraintlayout
  74. implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
  75. //androidx-navigation
  76. implementation 'androidx.navigation:navigation-fragment:2.3.0'
  77. implementation 'androidx.navigation:navigation-ui:2.3.0'
  78. implementation 'androidx.navigation:navigation-fragment-ktx:2.3.0'
  79. implementation 'androidx.navigation:navigation-ui-ktx:2.3.0'
  80. //androidx-lifecycle
  81. implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.2.0'
  82. implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.2.0'
  83. implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
  84. //androidx-preference
  85. implementation 'androidx.preference:preference:1.1.1'
  86. //kotlinx-coroutines
  87. implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.9"
  88. implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.4'
  89. //zip
  90. implementation 'net.lingala.zip4j:zip4j:2.5.2'
  91. //BaseRecyclerViewAdapterHelper
  92. implementation 'com.github.CymChad:BaseRecyclerViewAdapterHelper:3.0.2'
  93. //mirai-core
  94. implementation "net.mamoe:mirai-core-qqandroid:$CORE_VERSION"
  95. //mirai-lua
  96. implementation "com.ooooonly:luaMirai:$LUAMIRAI_VERSION"
  97. //noinspection DuplicatePlatformClasses
  98. //implementation 'org.json:json:20160212'
  99. //{
  100. //exclude module: 'okio'
  101. //exclude module: 'okhttp3'
  102. //}
  103. //implementation 'com.ooooonly:giteeman:0.1.1'
  104. //splitties
  105. implementation("com.louiscad.splitties:splitties-fun-pack-android-base:3.0.0-alpha06")
  106. implementation("com.louiscad.splitties:splitties-fun-pack-android-appcompat:3.0.0-alpha06")
  107. //acra
  108. implementation "ch.acra:acra-core:5.1.3"
  109. implementation "ch.acra:acra-toast:5.1.3"
  110. //glide
  111. implementation 'com.github.bumptech.glide:glide:4.11.0'
  112. annotationProcessor 'com.github.bumptech.glide:compiler:4.11.0'
  113. //yaml
  114. implementation group: 'org.yaml', name: 'snakeyaml', version: '1.26'
  115. implementation group: 'com.moandjiezana.toml', name: 'toml4j', version: '0.7.2'
  116. //okhttp3
  117. implementation 'com.squareup.okhttp3:okhttp:4.7.2'
  118. //test
  119. implementation 'androidx.test.espresso:espresso-idling-resource:3.2.0'
  120. debugImplementation 'androidx.fragment:fragment-testing:1.2.4'
  121. testImplementation 'junit:junit:4.12'
  122. androidTestImplementation 'androidx.test.ext:junit:1.1.1'
  123. androidTestImplementation 'androidx.test:runner:1.2.0'
  124. androidTestImplementation 'androidx.test:rules:1.2.0'
  125. androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
  126. androidTestImplementation 'androidx.test.espresso:espresso-intents:3.2.0'
  127. androidTestImplementation 'androidx.test.uiautomator:uiautomator:2.2.0'
  128. // https://mvnrepository.com/artifact/net.mamoe/mirai-console
  129. // implementation group: 'net.mamoe', name: 'mirai-console', version: '0.5.1'
  130. // implementation "net.mamoe:mirai-core:0.39.1"
  131. // https://mvnrepository.com/artifact/org.yaml/snakeyaml
  132. // https://mvnrepository.com/artifact/com.moandjiezana.toml/toml4j
  133. }