forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
197 lines (170 loc) · 8.5 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
// Copyright 2018 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
apply plugin: ChromiumPlugin
buildscript {
repositories {
maven {
url 'https://plugins.gradle.org/m2/'
}
}
dependencies {
classpath 'org.owasp:dependency-check-gradle:6+'
}
}
apply plugin: 'org.owasp.dependencycheck'
repositories {
google()
mavenCentral()
}
dependencyCheck {
// Any known vulnerability of any severity will cause the build to fail.
failBuildOnCVSS = 0
suppressionFile = file('vulnerability_supressions.xml')
// Libraries used in these configurations aren't shipped in Chrome.
// They are only used to aid in compiling or testing.
skipConfigurations = [
'buildCompile',
'buildCompileNoDeps',
'androidTestCompile',
'testCompile'
]
}
// See https://github.com/google/guava/releases/tag/v32.1.0
dependencies.constraints {
compile("com.google.guava:guava:32.1.3-android") {
attributes {
attribute(
TargetJvmEnvironment.TARGET_JVM_ENVIRONMENT_ATTRIBUTE,
objects.named(TargetJvmEnvironment, TargetJvmEnvironment.ANDROID))
}
}
buildCompile("com.google.guava:guava:32.1.3-jre") {
attributes {
attribute(
TargetJvmEnvironment.TARGET_JVM_ENVIRONMENT_ATTRIBUTE,
objects.named(TargetJvmEnvironment, TargetJvmEnvironment.STANDARD_JVM))
}
}
}
dependencies {
// Note about the configuration names: they are defined in buildSrc/ChromiumPlugin
compile 'com.google.android.material:material:1.11.0-beta01'
compile 'com.google.android.play:feature-delivery:2.0.1'
// Play services libraries
// See https://developers.google.com/android/guides/releases for updates
// Starting from 15.0.0 these libraries are allowed to update independently
String baseGmsVersion = '18.0.1'
// GCM is old and deprecated - nothing newer is available.
String gcmGmsVersion = '17.0.0'
// Attemped to roll cast with everything else, but it caused a missing class error, and we had
// no other versions available on CIPD - see crbug.com/1310799.
String castGmsVersion = '17.0.0'
compile "com.google.android.gms:play-services-basement:${baseGmsVersion}"
compile "com.google.android.gms:play-services-tasks:${baseGmsVersion}"
compile "com.google.android.gms:play-services-base:${baseGmsVersion}"
compile 'com.google.android.gms:play-services-auth-base:18.0.2'
compile "com.google.android.gms:play-services-auth-api-phone:${baseGmsVersion}"
compile 'com.google.android.gms:play-services-auth:20.1.0'
compile "com.google.android.gms:play-services-cast:${castGmsVersion}"
compile "com.google.android.gms:play-services-cast-framework:${castGmsVersion}"
compile "com.google.android.gms:play-services-identity-credentials:16.0.0-alpha02"
compile "com.google.android.gms:play-services-iid:${gcmGmsVersion}"
compile "com.google.android.gms:play-services-instantapps:${baseGmsVersion}"
compile "com.google.android.gms:play-services-gcm:${gcmGmsVersion}"
compile 'com.google.android.gms:play-services-location:21.0.1'
compile 'com.google.android.gms:play-services-vision-common:19.1.3'
compile 'com.google.android.gms:play-services-vision:20.1.3'
// Needed only by internal targets:
compile "com.android.support:support-annotations:28.0.0"
buildCompile 'com.google.auto.service:auto-service-annotations:1.0-rc6'
compile 'com.google.code.findbugs:jsr305:3.0.2'
compile 'com.google.firebase:firebase-iid:21.0.1'
compile 'com.google.firebase:firebase-messaging:21.0.1'
compile 'com.google.j2objc:j2objc-annotations:2.8'
// buildCompile needed because we add a custom dep of onto this from guava
// to fix "unknown enum constant ReflectionSupport$Level.FULL".
buildCompile 'com.google.j2objc:j2objc-annotations:2.8'
compile 'com.google.protobuf:protobuf-javalite:4.28.0'
compile 'javax.annotation:javax.annotation-api:1.3.2'
compile 'javax.annotation:jsr250-api:1.0'
compile 'javax.inject:javax.inject:1'
compile 'io.grpc:grpc-binder:1.49.0'
compile 'io.grpc:grpc-context:1.49.0'
compile 'io.grpc:grpc-protobuf-lite:1.49.0'
compile 'io.grpc:grpc-stub:1.49.0'
compile 'io.grpc:grpc-api:1.49.0'
// Needed by androidx.room, but by default it selects a lower version that
// does not exist in CIPD.
compile 'org.jetbrains.kotlinx:atomicfu-jvm:0.23.2'
// Needed by androidx and by doubledown targets.
// Note: These have version overrides set in ChromiumDepGraph.groovy.
compile "org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.8.1"
compile "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.8.1"
compile "org.jetbrains.kotlinx:kotlinx-coroutines-guava:1.8.1"
compile "org.jetbrains.kotlinx:kotlinx-serialization-core-jvm:1.7.2"
compile "org.jetbrains.kotlin:kotlin-parcelize-runtime:1.9.22"
// Needed by androidx.datastore
compile "com.squareup.okio:okio-jvm:3.9.0"
// Needed by androidx.macrobenchmarks
androidTestCompile "com.squareup.wire:wire-runtime-jvm:4.4.3"
// Needed by androidx.benchmark
androidTestCompile "com.squareup.moshi:moshi-adapters:1.15.0"
// There is an -jre flavor of guava as well, but it requires Android O+ (for MethodHandle).
// The -android version is missing symbols (e.g. ImmutableList stream APIs).
// Thus, we need both for now, but we should be able to consolidate once O is our minSdkVersion.
// https://github.com/google/guava/wiki/Compatibility
compile "com.google.guava:guava:32.1.3-android"
buildCompile "com.google.guava:guava:32.1.3-jre"
String daggerVersion = '2.52'
compile "com.google.dagger:dagger:${daggerVersion}"
compile "com.google.dagger:hilt-core:${daggerVersion}"
// Used by ModuleInterfaceProcessor.java
buildCompile 'com.squareup:javapoet:1.13.0'
// Provides annotations used to opt into checks.
compile "com.google.errorprone:error_prone_annotations:2.23.0"
compile 'org.checkerframework:checker-compat-qual:2.5.5'
compile "org.checkerframework:checker-qual:3.25.0"
compile 'org.checkerframework:checker-util:3.25.0'
compile 'org.codehaus.mojo:animal-sniffer-annotations:1.17'
buildCompile 'com.google.code.gson:gson:2.8.0'
buildCompile 'org.ow2.asm:asm:7.0'
buildCompile 'org.ow2.asm:asm-commons:7.0'
buildCompile 'org.ow2.asm:asm-tree:7.0'
buildCompile 'org.ow2.asm:asm-util:7.0'
// Used by resource shrinking.
// buildCompileNoDeps targets do not bring in any of their dependencies,
// this list of targets is carefully curated for the use of the resources
// shrinker. If these are needed for something other than the resources
// shrinker, use buildCompile instead.
String androidToolsVersion = '30.2.0-beta01'
buildCompileNoDeps "com.android.tools:sdk-common:${androidToolsVersion}"
buildCompileNoDeps "com.android.tools:common:${androidToolsVersion}"
buildCompileNoDeps "com.android.tools.layoutlib:layoutlib-api:${androidToolsVersion}"
androidTestCompile 'com.google.android.apps.common.testing.accessibility.framework:accessibility-test-framework:4.0.0'
// accessibility-test-framework:3.1.2 depends on jsoup 1.12, which has a security
// vulnerability, so grab a later version.
androidTestCompile 'org.jsoup:jsoup:1.14.3'
androidTestCompile 'com.googlecode.java-diff-utils:diffutils:1.3.0'
// Version 1.2 is needed by espresso-web, but we'll newer 1.2.1.
androidTestCompile 'org.ccil.cowan.tagsoup:tagsoup:1.2.1'
// accessibility-test-framework has a phantom dependency on the really old
// protobuf runtime which trips our asserts. Manually add dep here but
// exclude it in ChromiumDepGraph.
androidTestCompile 'com.google.protobuf:protobuf-lite:3.0.0'
String mockitoVersion = '5.11.0'
androidTestCompile "org.mockito:mockito-android:${mockitoVersion}"
androidTestCompile "org.mockito:mockito-core:${mockitoVersion}"
androidTestCompile "org.mockito:mockito-subclass:${mockitoVersion}"
// Used by //third_party/byte_buddy
androidTestCompile "net.bytebuddy:byte-buddy:1.14.5"
// Use testCompile to have is_robolectric = true set on targets.
testCompile "org.robolectric:robolectric:4.12.1"
}
task setUpRepository(type: BuildConfigGenerator) {
// Paths are relative to the chromium source root.
repositoryPath 'third_party/android_deps'
chromiumSourceRoot '../..'
cipdBucket 'chromium'
internalTargetVisibility = [ ':*', '//third_party/androidx:*' ]
}