build.gradle 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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. }
  29. dependencies {
  30. implementation fileTree(dir: 'libs', include: ['*.jar'])
  31. implementation 'com.android.support.constraint:constraint-layout:1.1.2'
  32. testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-api', version: JUNIT_VERSION
  33. androidTestImplementation('com.android.support.test.espresso:espresso-core:3.0.2', {
  34. exclude group: 'com.android.support', module: 'support-annotations'
  35. })
  36. ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  37. // kotlin 依赖
  38. implementation group: 'org.jetbrains.kotlin', name: 'kotlin-stdlib-jdk8', version: KOTLIN_VERSION
  39. ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  40. // android支持
  41. implementation group: 'com.android.support', name: 'appcompat-v7', version: ANDROID_SUPPORT_VERSION
  42. implementation group: 'com.android.support', name: 'design', version: ANDROID_SUPPORT_VERSION
  43. implementation group: 'com.android.support', name: 'support-v4', version: ANDROID_SUPPORT_VERSION
  44. implementation group: 'com.android.support.constraint', name: 'constraint-layout', version: CONSTRAINT_VERSION
  45. ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  46. // anko依赖
  47. // https://mvnrepository.com/artifact/org.jetbrains.anko/anko-commons
  48. implementation group: 'org.jetbrains.anko', name: 'anko-commons', version: ANKO_VERSION
  49. ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  50. // Sybotan依赖
  51. implementation group: 'com.sybotan', name: 'sybotan-kotlin-base', version: SYBOTAN_KOTLIN_VERSION
  52. implementation group: 'com.sybotan', name: 'sybotan-android-base', version: SYBOTAN_ANDROID_VERSION
  53. implementation group: 'com.sybotan', name: 'sybotan-android-graphy', version: SYBOTAN_ANDROID_VERSION
  54. implementation project(':cadengine')
  55. }