build.gradle 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. group 'com.signify.hue.flutterreactiveblelib'
  2. version '1.0-SNAPSHOT'
  3. buildscript {
  4. ext.detekt_version = '1.17.1'
  5. ext.kotlin_version = '1.5.31'
  6. repositories {
  7. google()
  8. mavenCentral()
  9. maven {
  10. url "https://plugins.gradle.org/m2/"
  11. }
  12. }
  13. dependencies {
  14. classpath 'com.android.tools.build:gradle:7.0.3'
  15. classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.17'
  16. classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
  17. classpath "io.gitlab.arturbosch.detekt:detekt-gradle-plugin:$detekt_version"
  18. classpath "de.mannodermaus.gradle.plugins:android-junit5:1.7.1.1"
  19. }
  20. }
  21. rootProject.allprojects {
  22. repositories {
  23. google()
  24. mavenCentral()
  25. maven {
  26. url "https://plugins.gradle.org/m2/"
  27. }
  28. }
  29. }
  30. apply plugin: 'com.android.library'
  31. apply plugin: 'com.google.protobuf'
  32. apply plugin: 'kotlin-android'
  33. apply plugin: "io.gitlab.arturbosch.detekt"
  34. apply plugin: "de.mannodermaus.android-junit5"
  35. android {
  36. compileSdkVersion 31
  37. sourceSets {
  38. main.java.srcDirs += 'src/main/kotlin'
  39. test.java.srcDirs += 'src/test/kotlin'
  40. main {
  41. proto {
  42. srcDir '../protos/'
  43. }
  44. }
  45. }
  46. defaultConfig {
  47. minSdkVersion 21
  48. targetSdkVersion 31
  49. consumerProguardFiles 'proguard-rules.txt'
  50. }
  51. lintOptions {
  52. disable 'InvalidPackage'
  53. }
  54. compileOptions {
  55. sourceCompatibility JavaVersion.VERSION_1_8
  56. targetCompatibility JavaVersion.VERSION_1_8
  57. }
  58. kotlinOptions {
  59. jvmTarget = JavaVersion.VERSION_1_8.toString()
  60. }
  61. }
  62. detekt {
  63. version = detekt_version
  64. input = files("src/main/kotlin")
  65. dependencies {
  66. detektPlugins "io.gitlab.arturbosch.detekt:detekt-formatting:$detekt_version"
  67. }
  68. }
  69. protobuf {
  70. protoc {
  71. artifact = 'com.google.protobuf:protoc:3.18.1'
  72. }
  73. generateProtoTasks {
  74. all().each { task ->
  75. task.builtins {
  76. java {
  77. option "lite"
  78. }
  79. }
  80. }
  81. }
  82. }
  83. dependencies {
  84. implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
  85. implementation 'com.polidea.rxandroidble2:rxandroidble:1.16.0'
  86. implementation 'com.google.protobuf:protobuf-javalite:3.18.1'
  87. implementation 'io.reactivex.rxjava2:rxkotlin:2.4.0'
  88. implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'
  89. testImplementation "org.junit.jupiter:junit-jupiter-api:5.7.0"
  90. testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:5.7.0"
  91. testImplementation "io.mockk:mockk:1.11.0"
  92. testImplementation "com.google.truth:truth:1.0"
  93. }