mirror of https://github.com/grpc/grpc-java.git
66 lines
1.7 KiB
Groovy
66 lines
1.7 KiB
Groovy
plugins {
|
|
id "java-library"
|
|
id "java-test-fixtures"
|
|
id "maven-publish"
|
|
|
|
id "me.champeau.jmh"
|
|
id "ru.vyarus.animalsniffer"
|
|
}
|
|
|
|
description = 'gRPC: API'
|
|
|
|
sourceSets {
|
|
context
|
|
main {
|
|
output.classesDirs.from(sourceSets.context.output.classesDirs)
|
|
}
|
|
}
|
|
|
|
tasks.named("compileContextJava").configure {
|
|
if (JavaVersion.current().isJava9Compatible()) {
|
|
options.release = 7
|
|
} else {
|
|
sourceCompatibility = JavaVersion.VERSION_1_7
|
|
targetCompatibility = JavaVersion.VERSION_1_7
|
|
}
|
|
}
|
|
|
|
tasks.named("jar").configure {
|
|
manifest {
|
|
attributes('Automatic-Module-Name': 'io.grpc')
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
compileOnly sourceSets.context.output
|
|
api libraries.jsr305,
|
|
libraries.errorprone.annotations
|
|
implementation libraries.guava
|
|
|
|
testFixturesApi libraries.truth
|
|
testFixturesImplementation libraries.jsr305
|
|
testFixturesImplementation libraries.guava,
|
|
libraries.junit,
|
|
libraries.mockito.core
|
|
testImplementation project(':grpc-testing'),
|
|
project(':grpc-grpclb')
|
|
testImplementation libraries.guava.testlib
|
|
jmh project(':grpc-core')
|
|
|
|
signature libraries.signature.java
|
|
signature libraries.signature.android
|
|
}
|
|
|
|
tasks.named("javadoc").configure {
|
|
source sourceSets.context.allSource
|
|
// We want io.grpc.Internal, but not io.grpc.Internal*
|
|
exclude 'io/grpc/Internal?*.java'
|
|
}
|
|
|
|
tasks.named("sourcesJar").configure {
|
|
from sourceSets.context.allSource
|
|
}
|
|
|
|
components.java.withVariantsFromConfiguration(configurations.testFixturesApiElements) { skip() }
|
|
components.java.withVariantsFromConfiguration(configurations.testFixturesRuntimeElements) { skip() }
|