55 lines
1.5 KiB
Groovy
55 lines
1.5 KiB
Groovy
apply from: "$rootDir/gradle/instrumentation.gradle"
|
|
|
|
apply plugin: 'com.google.protobuf'
|
|
apply plugin: 'idea'
|
|
|
|
muzzle {
|
|
pass {
|
|
group = "io.grpc"
|
|
module = "grpc-core"
|
|
versions = "[1.5.0,)"
|
|
}
|
|
}
|
|
|
|
buildscript {
|
|
repositories {
|
|
mavenLocal()
|
|
jcenter()
|
|
mavenCentral()
|
|
}
|
|
dependencies {
|
|
classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.12'
|
|
}
|
|
}
|
|
|
|
def grpcVersion = '1.5.0'
|
|
protobuf {
|
|
protoc {
|
|
// Download compiler rather than using locally installed version:
|
|
artifact = 'com.google.protobuf:protoc:3.3.0'
|
|
}
|
|
plugins {
|
|
grpc { artifact = "io.grpc:protoc-gen-grpc-java:${grpcVersion}" }
|
|
}
|
|
generateProtoTasks {
|
|
all()*.plugins { grpc {} }
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
library group: 'io.grpc', name: 'grpc-core', version: grpcVersion
|
|
|
|
testLibrary group: 'io.grpc', name: 'grpc-netty', version: grpcVersion
|
|
testLibrary group: 'io.grpc', name: 'grpc-protobuf', version: grpcVersion
|
|
testLibrary group: 'io.grpc', name: 'grpc-stub', version: grpcVersion
|
|
|
|
testImplementation group: 'javax.annotation', name: 'javax.annotation-api', version: '1.3.2'
|
|
|
|
// this instrumentation needs to be able to be able to reference the OpenTelemetry API's gRPC Context
|
|
// that is shaded in the bootstrap class loader (for sending telemetry to the agent),
|
|
// separately from the gRPC Context that is brought by gRPC
|
|
compileOnly project(path: ':opentelemetry-api-beta-shaded-for-instrumenting', configuration: 'shadow')
|
|
|
|
testImplementation project(path: ':opentelemetry-api-beta-shaded-for-instrumenting', configuration: 'shadow')
|
|
}
|