| buildscript { |
| dependencies { |
| classpath 'com.google.guava:guava:30.0-android' |
| } |
| } |
| |
| plugins { |
| id "java-library" |
| id "java-test-fixtures" |
| id "maven-publish" |
| |
| id "me.champeau.gradle.japicmp" |
| id "me.champeau.jmh" |
| id "ru.vyarus.animalsniffer" |
| } |
| |
| description = 'gRPC: Core' |
| |
| dependencies { |
| api project(':grpc-api') |
| // force dependent jars to depend on latest grpc-context |
| runtimeOnly project(":grpc-context") |
| implementation libraries.gson, |
| libraries.android.annotations, |
| libraries.animalsniffer.annotations, |
| libraries.errorprone.annotations, |
| libraries.guava, |
| libraries.perfmark.api |
| testFixturesApi libraries.junit |
| testFixturesImplementation libraries.guava, |
| libraries.mockito.core, |
| libraries.truth, |
| project(':grpc-testing') |
| testImplementation testFixtures(project(':grpc-api')), |
| project(':grpc-testing') |
| testImplementation libraries.guava.testlib |
| |
| testRuntimeOnly project(':grpc-census') |
| |
| jmh project(':grpc-testing') |
| |
| signature libraries.signature.java |
| signature libraries.signature.android |
| } |
| |
| tasks.named("javadoc").configure { |
| exclude 'io/grpc/internal/**' |
| exclude 'io/grpc/inprocess/Internal*' |
| // Disabled until kinda stable. |
| exclude 'io/grpc/perfmark/**' |
| } |
| |
| tasks.named("jar").configure { |
| manifest { |
| attributes('Automatic-Module-Name': 'io.grpc.internal') |
| } |
| } |
| |
| animalsniffer { |
| // Don't check sourceSets.jmh |
| sourceSets = [ |
| sourceSets.main, |
| sourceSets.test |
| ] |
| } |
| |
| components.java.withVariantsFromConfiguration(configurations.testFixturesApiElements) { skip() } |
| components.java.withVariantsFromConfiguration(configurations.testFixturesRuntimeElements) { skip() } |
| |
| tasks.register("versionFile") { |
| doLast { |
| new File(buildDir, "version").write("${project.version}\n") |
| } |
| } |