build.gradle 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201
  1. // Copyright 2018 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. apply plugin: ChromiumPlugin
  5. buildscript {
  6. repositories {
  7. maven {
  8. url 'https://plugins.gradle.org/m2/'
  9. }
  10. }
  11. dependencies {
  12. classpath 'org.owasp:dependency-check-gradle:6+'
  13. }
  14. }
  15. apply plugin: 'org.owasp.dependencycheck'
  16. repositories {
  17. google()
  18. mavenCentral()
  19. }
  20. dependencyCheck {
  21. // Any known vulnerability of any severity will cause the build to fail.
  22. failBuildOnCVSS = 0
  23. suppressionFile = file('vulnerability_supressions.xml')
  24. // Libraries used in these configurations aren't shipped in Chrome.
  25. // They are only used to aid in compiling or testing.
  26. skipConfigurations = [
  27. 'buildCompile',
  28. 'buildCompileNoDeps',
  29. 'androidTestCompile',
  30. 'testCompile'
  31. ]
  32. }
  33. dependencies {
  34. // Note about the configuration names: they are defined in buildSrc/ChromiumPlugin
  35. // Replacement for com.android.support:design
  36. compile 'com.google.android.material:material:1.7.0-alpha02'
  37. compile 'com.google.android.play:core:1.10.0'
  38. // Architecture components
  39. String archComponentsVersion = '1.1.1'
  40. compile "android.arch.lifecycle:runtime:${archComponentsVersion}"
  41. compile "android.arch.lifecycle:common:${archComponentsVersion}"
  42. compile "android.arch.lifecycle:common-java8:${archComponentsVersion}"
  43. compile "android.arch.lifecycle:viewmodel:${archComponentsVersion}"
  44. // Play services libraries
  45. // See https://developers.google.com/android/guides/releases for updates
  46. // Starting from 15.0.0 these libraries are allowed to update independently
  47. String baseGmsVersion = '18.0.1'
  48. // GCM is old and deprecated - nothing newer is available.
  49. String gcmGmsVersion = '17.0.0'
  50. // Attemped to roll cast with everything else, but it caused a missing class error, and we had
  51. // no other versions available on CIPD - see crbug.com/1310799.
  52. String castGmsVersion = '17.0.0'
  53. compile "com.google.android.gms:play-services-basement:${baseGmsVersion}"
  54. compile "com.google.android.gms:play-services-tasks:${baseGmsVersion}"
  55. compile "com.google.android.gms:play-services-base:${baseGmsVersion}"
  56. compile 'com.google.android.gms:play-services-auth-base:18.0.2'
  57. compile "com.google.android.gms:play-services-auth-api-phone:${baseGmsVersion}"
  58. compile 'com.google.android.gms:play-services-auth:20.1.0'
  59. compile "com.google.android.gms:play-services-cast:${castGmsVersion}"
  60. compile "com.google.android.gms:play-services-cast-framework:${castGmsVersion}"
  61. compile "com.google.android.gms:play-services-iid:${gcmGmsVersion}"
  62. compile "com.google.android.gms:play-services-instantapps:${baseGmsVersion}"
  63. compile "com.google.android.gms:play-services-gcm:${gcmGmsVersion}"
  64. compile 'com.google.android.gms:play-services-location:19.0.1'
  65. compile 'com.google.android.gms:play-services-vision-common:19.1.3'
  66. compile 'com.google.android.gms:play-services-vision:20.1.3'
  67. compile 'com.google.android.gms:play-services-fido:19.0.0-beta'
  68. // TODO (bjoyce): Remove after androidx migration crbug.com/896775
  69. // Support v4 libraries
  70. String supportLibVersion = '28.0.0'
  71. compile "com.android.support:support-v4:${supportLibVersion}"
  72. compile "com.android.support:support-compat:${supportLibVersion}"
  73. compile "com.android.support:support-core-ui:${supportLibVersion}"
  74. compile "com.android.support:support-core-utils:${supportLibVersion}"
  75. compile "com.android.support:support-fragment:${supportLibVersion}"
  76. compile "com.android.support:support-annotations:${supportLibVersion}"
  77. compile "com.android.support:design:${supportLibVersion}"
  78. compile "com.android.support:asynclayoutinflater:${supportLibVersion}"
  79. compile "com.android.support:collections:${supportLibVersion}"
  80. compile "com.android.support:coordinatorlayout:${supportLibVersion}"
  81. compile "com.android.support:customview:${supportLibVersion}"
  82. compile "com.android.support:drawerlayout:${supportLibVersion}"
  83. compile "com.android.support:interpolator:${supportLibVersion}"
  84. compile 'com.android.support:localbroadcastmanager:1.1.0-SNAPSHOT'
  85. compile "com.android.support:swiperefreshlayout:${supportLibVersion}"
  86. compile "com.android.support:viewpager:${supportLibVersion}"
  87. compile 'com.android.support:multidex:1.0.0'
  88. compile 'com.google.code.findbugs:jsr305:3.0.2'
  89. compile 'com.google.flatbuffers:flatbuffers-java:2.0.3'
  90. compile 'com.google.firebase:firebase-iid:21.0.1'
  91. compile 'com.google.firebase:firebase-messaging:21.0.1'
  92. compile 'com.google.guava:failureaccess:1.0.1'
  93. compile 'com.google.j2objc:j2objc-annotations:1.1'
  94. compile 'com.google.protobuf:protobuf-javalite:3.19.3'
  95. compile 'javax.annotation:javax.annotation-api:1.3.2'
  96. compile 'javax.annotation:jsr250-api:1.0'
  97. compile 'javax.inject:javax.inject:1'
  98. // Used by R8 to desugar library functions.
  99. // See instructions in //third_party/r8/README.chromium for how to
  100. // update desugar_jdk_libs.json (needed when changing this version).
  101. compile 'com.android.tools:desugar_jdk_libs:1.1.5'
  102. compile 'com.android.tools:desugar_jdk_libs_configuration:1.1.5'
  103. // Needed by androidx and by doubledown targets.
  104. // Note: These have version overrides set in ChromiumDepGraph.groovy.
  105. compile "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.1"
  106. compile "org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.6.1"
  107. compile "org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.6.20"
  108. compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.20"
  109. // Upstream guava introduced versions with -android suffix starting with version
  110. // 22 to remove incompatible code with android. Thus we keep two jars, one for
  111. // the full guava and one that supports android.
  112. String guavaVersion = '31.0'
  113. compile "com.google.guava:guava:${guavaVersion}-android"
  114. // buildCompile targets have supports_android = false.
  115. buildCompile "com.google.guava:guava:${guavaVersion}-jre"
  116. String daggerVersion = '2.30'
  117. compile "com.google.dagger:dagger:${daggerVersion}"
  118. buildCompile "com.google.dagger:dagger-compiler:${daggerVersion}"
  119. // Matches version depended on by Dagger.
  120. buildCompile 'com.squareup:javapoet:1.13.0'
  121. String errorproneVersion = '2.11.0'
  122. // Used by downstream targets.
  123. compile "com.google.errorprone:error_prone_annotations:${errorproneVersion}"
  124. compile 'org.checkerframework:checker-compat-qual:2.5.3'
  125. compile 'org.codehaus.mojo:animal-sniffer-annotations:1.17'
  126. // Dedicated configuration to avoid using higher version number. The 9999 version is empty.
  127. // This has a version override in ChromiumDepGraph.groovy.
  128. compile 'com.google.guava:listenablefuture:1.0'
  129. buildCompile "com.google.errorprone:error_prone_core:${errorproneVersion}"
  130. buildCompile "com.google.errorprone:error_prone_check_api:${errorproneVersion}"
  131. buildCompile "com.google.errorprone:error_prone_annotation:${errorproneVersion}"
  132. buildCompile 'com.google.errorprone:javac:9+181-r4173-1'
  133. buildCompile 'com.google.auto.service:auto-service:1.0-rc6'
  134. buildCompile 'com.google.auto.service:auto-service-annotations:1.0-rc6'
  135. buildCompile 'com.google.code.gson:gson:2.8.0'
  136. buildCompile 'org.ow2.asm:asm:7.0'
  137. buildCompile 'org.ow2.asm:asm-commons:7.0'
  138. buildCompile 'org.ow2.asm:asm-tree:7.0'
  139. buildCompile 'org.ow2.asm:asm-util:7.0'
  140. // Used by resource shrinking.
  141. // buildCompileNoDeps targets do not bring in any of their dependencies,
  142. // this list of targets is carefully curated for the use of the resources
  143. // shrinker. If these are needed for something other than the resources
  144. // shrinker, use buildCompile instead.
  145. String androidToolsVersion = '30.2.0-beta01'
  146. buildCompileNoDeps "com.android.tools:sdk-common:${androidToolsVersion}"
  147. buildCompileNoDeps "com.android.tools:common:${androidToolsVersion}"
  148. buildCompileNoDeps "com.android.tools.layoutlib:layoutlib-api:${androidToolsVersion}"
  149. buildCompile 'org.jetbrains.kotlin:kotlin-stdlib:1.4.32'
  150. androidTestCompile 'com.google.android.apps.common.testing.accessibility.framework:accessibility-test-framework:3.1.2'
  151. // accessibility-test-framework:3.1.2 depends on jsoup 1.12, which has a security
  152. // vulnerability, so grab a later version.
  153. androidTestCompile 'org.jsoup:jsoup:1.14.3'
  154. androidTestCompile 'com.googlecode.java-diff-utils:diffutils:1.3.0'
  155. // Version 1.2 is needed by espresso-web, but we'll newer 1.2.1.
  156. androidTestCompile 'org.ccil.cowan.tagsoup:tagsoup:1.2.1'
  157. String robolectricVersion = '4.8.1'
  158. // Use testCompile to avoid having support_android = true set on
  159. // robolectric dependencies.
  160. testCompile "org.robolectric:robolectric:${robolectricVersion}"
  161. testCompile "org.robolectric:shadows-multidex:${robolectricVersion}"
  162. testCompile "org.robolectric:shadows-playservices:${robolectricVersion}"
  163. testCompile "org.robolectric:utils:${robolectricVersion}"
  164. }
  165. task setUpRepository(type: BuildConfigGenerator) {
  166. // Paths are relative to the chromium source root.
  167. repositoryPath 'third_party/android_deps'
  168. chromiumSourceRoot '../..'
  169. cipdBucket 'chromium'
  170. internalTargetVisibility = [ ':*', '//third_party/androidx:*' ]
  171. }