build.gradle 8.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217
  1. // Top-level build file where you can add configuration options common to all sub-projects/modules.
  2. buildscript {
  3. ext.kotlin_version = '1.6.10'
  4. repositories {
  5. google()
  6. jcenter()
  7. }
  8. dependencies {
  9. classpath 'com.android.tools.build:gradle:7.1.2'
  10. classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
  11. // NOTE: Do not place your application dependencies here; they belong
  12. // in the individual module build.gradle files
  13. }
  14. }
  15. allprojects {
  16. repositories {
  17. google()
  18. jcenter()
  19. maven { url 'https://jitpack.io' }
  20. }
  21. }
  22. task clean(type: Delete) {
  23. delete rootProject.buildDir
  24. }
  25. /*
  26. * Copyright (C) 2018 The Android Open Source Project
  27. *
  28. * Licensed under the Apache License, Version 2.0 (the "License");
  29. * you may not use this file except in compliance with the License.
  30. * You may obtain a copy of the License at
  31. *
  32. * http://www.apache.org/licenses/LICENSE-2.0
  33. *
  34. * Unless required by applicable law or agreed to in writing, software
  35. * distributed under the License is distributed on an "AS IS" BASIS,
  36. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  37. * See the License for the specific language governing permissions and
  38. * limitations under the License.
  39. */
  40. /**
  41. * Shared file between builds so that they can all use the same dependencies and
  42. * maven repositories.
  43. **/
  44. ext.deps = [:]
  45. def versions = [:]
  46. versions.activity = '1.0.0-rc01'
  47. versions.android_gradle_plugin = '3.4.0'
  48. versions.apache_commons = "2.5"
  49. versions.appcompat = '1.1.0'
  50. versions.arch_core = '2.1.0'
  51. versions.atsl_core = "1.2.0"
  52. versions.atsl_junit = "1.1.1"
  53. versions.atsl_rules = "1.2.0"
  54. versions.atsl_runner = "1.2.0"
  55. versions.benchmark = "1.0.0-beta01"
  56. versions.constraint_layout = '2.0.0-beta3'
  57. versions.core_ktx = '1.1.0'
  58. versions.dagger = "2.16"
  59. versions.dexmaker = "2.2.0"
  60. versions.espresso = "3.2.0"
  61. versions.fragment = "1.2.0-alpha02"
  62. versions.glide = "4.8.0"
  63. versions.hamcrest = "1.3"
  64. versions.junit = "4.12"
  65. versions.kotlin = "1.3.50"
  66. versions.lifecycle = "2.2.0-alpha03"
  67. versions.mockito = "2.25.0"
  68. versions.mockito_all = "1.10.19"
  69. versions.mockito_android = "2.25.0"
  70. versions.mockwebserver = "3.8.1"
  71. versions.navigation = '2.2.0-rc01'
  72. versions.okhttp_logging_interceptor = "3.9.0"
  73. versions.paging = "2.1.0-rc01"
  74. versions.retrofit = "2.3.0"
  75. versions.robolectric = "4.2"
  76. versions.room = '2.2.1'
  77. versions.rx_android = "2.0.1"
  78. versions.rxjava2 = "2.1.3"
  79. versions.support = "1.0.0"
  80. versions.timber = "4.5.1"
  81. versions.work = "2.2.0"
  82. ext.versions = versions
  83. def deps = [:]
  84. deps.benchmark = "androidx.benchmark:benchmark-junit4:$versions.benchmark"
  85. deps.benchmark_gradle = "androidx.benchmark:benchmark-gradle-plugin:$versions.benchmark"
  86. def support = [:]
  87. support.annotations = "androidx.annotation:annotation:$versions.support"
  88. support.app_compat = "androidx.appcompat:appcompat:$versions.appcompat"
  89. support.recyclerview = "androidx.recyclerview:recyclerview:$versions.support"
  90. support.cardview = "androidx.cardview:cardview:$versions.support"
  91. support.design = "com.google.android.material:material:$versions.support"
  92. support.core_utils = "androidx.legacy:legacy-support-core-utils:$versions.support"
  93. support.core_ktx = "androidx.core:core-ktx:$versions.core_ktx"
  94. support.fragment_runtime = "androidx.fragment:fragment:${versions.fragment}"
  95. support.fragment_runtime_ktx = "androidx.fragment:fragment-ktx:${versions.fragment}"
  96. support.fragment_testing = "androidx.fragment:fragment-testing:${versions.fragment}"
  97. deps.support = support
  98. def room = [:]
  99. room.runtime = "androidx.room:room-runtime:$versions.room"
  100. room.compiler = "androidx.room:room-compiler:$versions.room"
  101. room.rxjava2 = "androidx.room:room-rxjava2:$versions.room"
  102. room.testing = "androidx.room:room-testing:$versions.room"
  103. deps.room = room
  104. def lifecycle = [:]
  105. lifecycle.runtime = "androidx.lifecycle:lifecycle-runtime:$versions.lifecycle"
  106. lifecycle.java8 = "androidx.lifecycle:lifecycle-common-java8:$versions.lifecycle"
  107. lifecycle.compiler = "androidx.lifecycle:lifecycle-compiler:$versions.lifecycle"
  108. lifecycle.viewmodel_ktx = "androidx.lifecycle:lifecycle-viewmodel-ktx:$versions.lifecycle"
  109. lifecycle.livedata_ktx = "androidx.lifecycle:lifecycle-livedata-ktx:$versions.lifecycle"
  110. deps.lifecycle = lifecycle
  111. def activity = [:]
  112. activity.activity_ktx = "androidx.activity:activity-ktx:$versions.activity"
  113. deps.activity = activity
  114. def arch_core = [:]
  115. arch_core.runtime = "androidx.arch.core:core-runtime:$versions.arch_core"
  116. arch_core.testing = "androidx.arch.core:core-testing:$versions.arch_core"
  117. deps.arch_core = arch_core
  118. def retrofit = [:]
  119. retrofit.runtime = "com.squareup.retrofit2:retrofit:$versions.retrofit"
  120. retrofit.gson = "com.squareup.retrofit2:converter-gson:$versions.retrofit"
  121. retrofit.mock = "com.squareup.retrofit2:retrofit-mock:$versions.retrofit"
  122. deps.retrofit = retrofit
  123. deps.okhttp_logging_interceptor = "com.squareup.okhttp3:logging-interceptor:${versions.okhttp_logging_interceptor}"
  124. def dagger = [:]
  125. dagger.runtime = "com.google.dagger:dagger:$versions.dagger"
  126. dagger.android = "com.google.dagger:dagger-android:$versions.dagger"
  127. dagger.android_support = "com.google.dagger:dagger-android-support:$versions.dagger"
  128. dagger.compiler = "com.google.dagger:dagger-compiler:$versions.dagger"
  129. dagger.android_support_compiler = "com.google.dagger:dagger-android-processor:$versions.dagger"
  130. deps.dagger = dagger
  131. def espresso = [:]
  132. espresso.core = "androidx.test.espresso:espresso-core:$versions.espresso"
  133. espresso.contrib = "androidx.test.espresso:espresso-contrib:$versions.espresso"
  134. espresso.intents = "androidx.test.espresso:espresso-intents:$versions.espresso"
  135. deps.espresso = espresso
  136. def atsl = [:]
  137. atsl.core = "androidx.test:core:$versions.atsl_core"
  138. atsl.ext_junit = "androidx.test.ext:junit:$versions.atsl_junit"
  139. atsl.runner = "androidx.test:runner:$versions.atsl_runner"
  140. atsl.rules = "androidx.test:rules:$versions.atsl_rules"
  141. deps.atsl = atsl
  142. def mockito = [:]
  143. mockito.core = "org.mockito:mockito-core:$versions.mockito"
  144. mockito.all = "org.mockito:mockito-all:$versions.mockito_all"
  145. mockito.android = "org.mockito:mockito-android:$versions.mockito_android"
  146. deps.mockito = mockito
  147. def kotlin = [:]
  148. kotlin.stdlib = "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$versions.kotlin"
  149. kotlin.test = "org.jetbrains.kotlin:kotlin-test-junit:$versions.kotlin"
  150. kotlin.plugin = "org.jetbrains.kotlin:kotlin-gradle-plugin:$versions.kotlin"
  151. kotlin.allopen = "org.jetbrains.kotlin:kotlin-allopen:$versions.kotlin"
  152. deps.kotlin = kotlin
  153. deps.paging_ktx = "androidx.paging:paging-runtime-ktx:$versions.paging"
  154. def glide = [:]
  155. glide.runtime = "com.github.bumptech.glide:glide:$versions.glide"
  156. glide.compiler = "com.github.bumptech.glide:compiler:$versions.glide"
  157. deps.glide = glide
  158. deps.dexmaker = "com.linkedin.dexmaker:dexmaker-mockito:$versions.dexmaker"
  159. deps.constraint_layout = "androidx.constraintlayout:constraintlayout:$versions.constraint_layout"
  160. deps.timber = "com.jakewharton.timber:timber:$versions.timber"
  161. deps.junit = "junit:junit:$versions.junit"
  162. deps.mock_web_server = "com.squareup.okhttp3:mockwebserver:$versions.mockwebserver"
  163. deps.rxjava2 = "io.reactivex.rxjava2:rxjava:$versions.rxjava2"
  164. deps.rx_android = "io.reactivex.rxjava2:rxandroid:$versions.rx_android"
  165. deps.hamcrest = "org.hamcrest:hamcrest-all:$versions.hamcrest"
  166. deps.android_gradle_plugin = "com.android.tools.build:gradle:$versions.android_gradle_plugin"
  167. deps.robolectric = "org.robolectric:robolectric:$versions.robolectric"
  168. ext.deps = deps
  169. def build_versions = [:]
  170. build_versions.min_sdk = 14
  171. build_versions.target_sdk = 29
  172. build_versions.build_tools = "29.0.2"
  173. ext.build_versions = build_versions
  174. def work = [:]
  175. work.runtime = "androidx.work:work-runtime:$versions.work"
  176. work.testing = "androidx.work:work-testing:$versions.work"
  177. work.firebase = "androidx.work:work-firebase:$versions.work"
  178. work.runtime_ktx = "androidx.work:work-runtime-ktx:$versions.work"
  179. deps.work = work
  180. def navigation = [:]
  181. navigation.runtime = "androidx.navigation:navigation-runtime:$versions.navigation"
  182. navigation.runtime_ktx = "androidx.navigation:navigation-runtime-ktx:$versions.navigation"
  183. navigation.fragment = "androidx.navigation:navigation-fragment:$versions.navigation"
  184. navigation.fragment_ktx = "androidx.navigation:navigation-fragment-ktx:$versions.navigation"
  185. navigation.ui = "androidx.navigation:navigation-ui:$versions.navigation"
  186. navigation.ui_ktx = "androidx.navigation:navigation-ui-ktx:$versions.navigation"
  187. navigation.safe_args_plugin = "androidx.navigation:navigation-safe-args-gradle-plugin:$versions.navigation"
  188. deps.navigation = navigation
  189. ext.deps = deps