build.gradle 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. apply plugin: 'com.android.application'
  2. apply plugin: 'kotlin-android'
  3. apply plugin: 'kotlin-android-extensions'
  4. android {
  5. compileSdkVersion ANDROID_SDK_VERSION.toInteger()
  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. }