-
Notifications
You must be signed in to change notification settings - Fork 3.9k
/
Copy pathbuild.gradle
84 lines (74 loc) · 3.04 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
plugins {
id "java-library"
id "maven-publish"
id "com.google.protobuf"
id "ru.vyarus.animalsniffer"
}
description = "gRPC: Google Cloud Platform Observability"
tasks.named("compileJava").configure {
it.options.compilerArgs += [
// only has AutoValue annotation processor
"-Xlint:-processing"
]
appendToProperty(
it.options.errorprone.excludedPaths,
".*/build/generated/sources/annotationProcessor/java/.*",
"|")
}
tasks.named("jar").configure {
manifest {
attributes('Automatic-Module-Name': 'io.grpc.gcp.observability')
}
}
dependencies {
annotationProcessor libraries.auto.value
api project(':grpc-api')
// TODO(dnvindhya): Prefer using our own libraries, update the dependencies
// in gradle/libs.versions instead
implementation project(':grpc-protobuf'),
project(':grpc-stub'),
project(':grpc-census'),
project(":grpc-context"), // Override opencensus dependency with our newer version
libraries.opencensus.contrib.grpc.metrics
// Avoid gradle using project dependencies without configuration: shadow
implementation (libraries.google.cloud.logging) {
exclude group: 'io.grpc', module: 'grpc-alts'
exclude group: 'io.grpc', module: 'grpc-netty-shaded'
exclude group: 'io.grpc', module: 'grpc-xds'
}
implementation (libraries.opencensus.exporter.stats.stackdriver) {
exclude group: 'io.grpc', module: 'grpc-alts'
exclude group: 'io.grpc', module: 'grpc-netty-shaded'
exclude group: 'io.grpc', module: 'grpc-xds'
}
implementation (libraries.opencensus.exporter.trace.stackdriver) {
exclude group: 'io.grpc', module: 'grpc-alts'
exclude group: 'io.grpc', module: 'grpc-netty-shaded'
exclude group: 'io.grpc', module: 'grpc-xds'
}
runtimeOnly libraries.opencensus.impl,
project(path: ':grpc-netty-shaded', configuration: 'shadow'),
project(path: ':grpc-xds', configuration: 'shadow'),
project(path: ':grpc-alts', configuration: 'shadow'),
project(':grpc-auth'), // Align grpc versions
project(':grpc-core'), // Align grpc versions
project(':grpc-grpclb'), // Align grpc versions
project(':grpc-services'), // Align grpc versions
libraries.animalsniffer.annotations, // Use our newer version
libraries.auto.value.annotations, // Use our newer version
libraries.guava.jre, // Use our newer version
libraries.protobuf.java.util, // Use our newer version
libraries.re2j // Use our newer version
testImplementation testFixtures(project(':grpc-api')),
project(':grpc-testing'),
project(':grpc-testing-proto')
testImplementation (libraries.guava.testlib) {
exclude group: 'junit', module: 'junit'
}
signature (libraries.signature.java) {
artifact {
extension = "signature"
}
}
}
configureProtoCompilation()