build.gradle 3.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. apply plugin: 'com.android.application'
  2. apply plugin: 'kotlin-android'
  3. apply plugin: 'kotlin-android-extensions'
  4. android {
  5. compileSdkVersion = 28
  6. buildToolsVersion ANDROID_BUILD_TOOLS_VERSION
  7. defaultConfig {
  8. minSdkVersion ANDROID_MIN_SDK_VERSION.toInteger()
  9. targetSdkVersion ANDROID_SDK_VERSION.toInteger()
  10. versionCode SYBOTAN_CODE.toInteger()
  11. versionName SYBOTAN_ANDROID_VERSION
  12. testInstrumentationRunner 'android.support.test.runner.AndroidJUnitRunner'
  13. vectorDrawables.useSupportLibrary = true
  14. }
  15. buildTypes {
  16. release {
  17. // minifyEnabled false
  18. proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
  19. }
  20. }
  21. // 解决lint语法检查错误(kotlin语法无法通过lint)
  22. lintOptions {
  23. abortOnError false
  24. }
  25. kotlinOptions {
  26. jvmTarget = JVM_TARGET
  27. }
  28. compileOptions {
  29. sourceCompatibility JavaVersion.VERSION_1_8
  30. targetCompatibility JavaVersion.VERSION_1_8
  31. }
  32. }
  33. dependencies {
  34. implementation fileTree(dir: 'libs', include: ['*.jar'])
  35. implementation 'com.android.support.constraint:constraint-layout:1.1.2'
  36. implementation project(path: ':sybotan-android-base')
  37. testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-api', version: JUNIT_VERSION
  38. androidTestImplementation('com.android.support.test.espresso:espresso-core:3.0.2', {
  39. exclude group: 'com.android.support', module: 'support-annotations'
  40. })
  41. ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  42. // kotlin 依赖
  43. implementation group: 'org.jetbrains.kotlin', name: 'kotlin-stdlib-jdk8', version: KOTLIN_VERSION
  44. ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  45. //noinspection GradleDependency
  46. implementation 'com.squareup.retrofit2:retrofit:2.3.0'
  47. //noinspection GradleDependency
  48. implementation 'com.squareup.retrofit2:converter-gson:2.3.0'
  49. // android支持
  50. implementation group: 'com.android.support', name: 'appcompat-v7', version: ANDROID_SUPPORT_VERSION
  51. implementation group: 'com.android.support', name: 'design', version: ANDROID_SUPPORT_VERSION
  52. implementation group: 'com.android.support', name: 'support-v4', version: ANDROID_SUPPORT_VERSION
  53. implementation group: 'com.android.support.constraint', name: 'constraint-layout', version: CONSTRAINT_VERSION
  54. ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  55. // anko依赖
  56. // https://mvnrepository.com/artifact/org.jetbrains.anko/anko-commons
  57. implementation group: 'org.jetbrains.anko', name: 'anko-commons', version: ANKO_VERSION
  58. //noinspection GradleDependency
  59. implementation 'com.squareup.retrofit2:converter-gson:2.3.0'
  60. ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  61. // Sybotan依赖
  62. // implementation group: "cn.sagacloud", name: "sybotan-android-base", version: SYBOTAN_ANDROID_VERSION
  63. // implementation group: "cn.sagacloud", name: "sybotan-android-graphy", version: SYBOTAN_ANDROID_VERSION
  64. // implementation group: "cn.sagacloud", name: "sybotan-android-database", version: SYBOTAN_ANDROID_VERSION
  65. implementation group: 'cn.sagacloud', name: 'saga-kotlin-base', version: SAGA_KOTLIN_VERSION
  66. implementation group: 'cn.sagacloud', name: 'saga-kotlin-database', version: SAGA_KOTLIN_VERSION
  67. implementation project(':cadengine')
  68. implementation project(':sybotan-android-graphy')
  69. //noinspection GradleDependency
  70. implementation 'org.greenrobot:eventbus:3.0.0'
  71. }