build.gradle 8.4KB

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