mirror of https://github.com/grpc/grpc-java.git
65 lines
1.8 KiB
Groovy
65 lines
1.8 KiB
Groovy
plugins {
|
|
id "java-library"
|
|
id "maven-publish"
|
|
|
|
id "me.champeau.gradle.japicmp"
|
|
id "ru.vyarus.animalsniffer"
|
|
}
|
|
|
|
description = "gRPC: OkHttp"
|
|
|
|
tasks.named("jar").configure {
|
|
manifest {
|
|
attributes('Automatic-Module-Name': 'io.grpc.okhttp')
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
api project(':grpc-util')
|
|
implementation libraries.okio,
|
|
libraries.guava,
|
|
libraries.perfmark.api
|
|
// Make okhttp dependencies compile only
|
|
compileOnly libraries.okhttp
|
|
|
|
// Needed because com.google.guava:guava:32.0.1-android requires
|
|
// com.google.errorprone:error_prone_annotations version 2.18.0, while we are running newer.
|
|
// TODO(any release manager): remove when guava is updated
|
|
runtimeOnly libraries.errorprone.annotations
|
|
|
|
// Tests depend on base class defined by core module.
|
|
testImplementation testFixtures(project(':grpc-core')),
|
|
testFixtures(project(':grpc-api')),
|
|
project(':grpc-testing'),
|
|
project(':grpc-testing-proto'),
|
|
libraries.netty.codec.http2,
|
|
libraries.okhttp
|
|
signature libraries.signature.java
|
|
signature libraries.signature.android
|
|
}
|
|
|
|
project.sourceSets {
|
|
main { java { srcDir "${projectDir}/third_party/okhttp/main/java" } }
|
|
test { java { srcDir "${projectDir}/third_party/okhttp/test/java" } }
|
|
}
|
|
|
|
tasks.named("checkstyleMain").configure {
|
|
exclude '**/io/grpc/okhttp/internal/**'
|
|
}
|
|
|
|
tasks.named("javadoc").configure {
|
|
options.links 'http://square.github.io/okhttp/2.x/okhttp/'
|
|
exclude 'io/grpc/okhttp/Internal*'
|
|
exclude 'io/grpc/okhttp/*Provider.java'
|
|
exclude 'io/grpc/okhttp/internal/**'
|
|
}
|
|
|
|
tasks.named("jacocoTestReport").configure {
|
|
classDirectories.from = sourceSets.main.output.collect {
|
|
fileTree(dir: it,
|
|
exclude: [
|
|
'**/io/grpc/okhttp/internal/**',
|
|
])
|
|
}
|
|
}
|