build.gradle 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. apply plugin: 'com.android.library'
  2. android {
  3. compileSdkVersion 28
  4. defaultConfig {
  5. minSdkVersion 16
  6. targetSdkVersion 28
  7. versionCode 1
  8. versionName "1.0"
  9. //指定room.schemaLocation生成的文件路径
  10. javaCompileOptions {
  11. annotationProcessorOptions {
  12. arguments = ["room.schemaLocation": "$projectDir/schemas".toString()]
  13. }
  14. }
  15. }
  16. lintOptions {
  17. checkReleaseBuilds false
  18. abortOnError false
  19. }
  20. buildTypes {
  21. release {
  22. minifyEnabled false
  23. proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
  24. }
  25. }
  26. }
  27. dependencies {
  28. implementation fileTree(dir: "libs", include: ["*.jar"])
  29. implementation 'androidx.appcompat:appcompat:1.2.0'
  30. api project(path: ':mylibrary')
  31. // Room
  32. def room_version = "2.2.6"
  33. api "androidx.room:room-runtime:$room_version"
  34. annotationProcessor "androidx.room:room-compiler:$room_version"
  35. // optional - RxJava support for Room
  36. // api "androidx.room:room-rxjava2:$room_version"
  37. // optional - Guava support for Room, including Optional and ListenableFuture
  38. // api "androidx.room:room-guava:$room_version"
  39. // optional - Test helpers
  40. // api "androidx.room:room-testing:$room_version"
  41. }