build.gradle 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. apply plugin: 'com.android.application'
  2. android {
  3. compileSdkVersion 28
  4. defaultConfig {
  5. applicationId "cn.minbb.serialport"
  6. minSdkVersion 19
  7. targetSdkVersion 28
  8. versionCode 1
  9. versionName "1.0"
  10. testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
  11. }
  12. buildTypes {
  13. release {
  14. minifyEnabled false
  15. proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
  16. }
  17. }
  18. sourceSets {
  19. main {
  20. assets.srcDirs = ['assets']
  21. jniLibs.srcDirs = ['libs']
  22. }
  23. }
  24. // 指定项目编码方式
  25. compileOptions.encoding = "UTF-8"
  26. // 指定编译版本
  27. compileOptions {
  28. sourceCompatibility JavaVersion.VERSION_1_8
  29. targetCompatibility JavaVersion.VERSION_1_8
  30. }
  31. // 指定本地仓库
  32. repositories {
  33. flatDir {
  34. dirs 'libs'
  35. }
  36. }
  37. }
  38. dependencies {
  39. implementation fileTree(dir: 'libs', include: ['*.jar'])
  40. implementation 'com.android.support:appcompat-v7:28.0.0'
  41. implementation 'com.android.support.constraint:constraint-layout:2.0.0-beta4'
  42. testImplementation 'junit:junit:4.13'
  43. androidTestImplementation 'com.android.support.test:runner:1.0.2'
  44. androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
  45. implementation 'com.jakewharton:butterknife:8.8.1'
  46. annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
  47. // implementation(name: 'serialport-release', ext: 'aar')
  48. implementation project(path: ':serialport')
  49. }