mirror of https://github.com/grpc/grpc-java.git
186 lines
6.7 KiB
Groovy
186 lines
6.7 KiB
Groovy
plugins {
|
|
id "application"
|
|
id "java-library"
|
|
id "maven-publish"
|
|
|
|
id "com.google.protobuf"
|
|
id "ru.vyarus.animalsniffer"
|
|
}
|
|
|
|
description = "gRPC: Integration Testing"
|
|
|
|
dependencies {
|
|
implementation project(path: ':grpc-alts', configuration: 'shadow'),
|
|
project(':grpc-auth'),
|
|
project(':grpc-census'),
|
|
project(':grpc-opentelemetry'),
|
|
project(':grpc-gcp-csm-observability'),
|
|
project(':grpc-netty'),
|
|
project(':grpc-okhttp'),
|
|
project(':grpc-services'),
|
|
project(':grpc-testing'),
|
|
project(':grpc-protobuf-lite'),
|
|
project(path: ':grpc-xds', configuration: 'shadow'),
|
|
libraries.hdrhistogram,
|
|
libraries.truth,
|
|
libraries.opencensus.contrib.grpc.metrics,
|
|
libraries.google.auth.oauth2Http,
|
|
libraries.opentelemetry.sdk.extension.autoconfigure,
|
|
libraries.guava.jre // Fix checkUpperBoundDeps using -android
|
|
api project(':grpc-api'),
|
|
project(':grpc-stub'),
|
|
project(':grpc-protobuf'),
|
|
libraries.junit
|
|
compileOnly libraries.javax.annotation
|
|
// TODO(sergiitk): replace with com.google.cloud:google-cloud-logging
|
|
// Used instead of google-cloud-logging because it's failing
|
|
// due to a circular dependency on grpc.
|
|
// https://cloud.google.com/logging/docs/setup/java#the_javautillogging_handler
|
|
// Error example: "java.util.logging.ErrorManager: 1"
|
|
// Latest failing version com.google.cloud:google-cloud-logging:2.1.2
|
|
runtimeOnly group: 'io.github.devatherock', name: 'jul-jsonformatter', version: '1.1.0'
|
|
runtimeOnly libraries.opencensus.impl,
|
|
libraries.netty.tcnative,
|
|
libraries.netty.tcnative.classes,
|
|
libraries.opentelemetry.exporter.prometheus, // For xds interop client
|
|
project(':grpc-googleapis'),
|
|
project(':grpc-grpclb'),
|
|
project(':grpc-rls')
|
|
testImplementation testFixtures(project(':grpc-api')),
|
|
testFixtures(project(':grpc-core')),
|
|
project(':grpc-inprocess'),
|
|
project(':grpc-core'),
|
|
libraries.mockito.core,
|
|
libraries.okhttp
|
|
|
|
signature (libraries.signature.java) {
|
|
artifact {
|
|
extension = "signature"
|
|
}
|
|
}
|
|
signature (libraries.signature.android) {
|
|
artifact {
|
|
extension = "signature"
|
|
}
|
|
}
|
|
}
|
|
|
|
configureProtoCompilation()
|
|
|
|
import net.ltgt.gradle.errorprone.CheckSeverity
|
|
|
|
tasks.named("compileJava").configure {
|
|
// This isn't a library; it can use beta APIs
|
|
options.errorprone.check("BetaApi", CheckSeverity.OFF)
|
|
}
|
|
|
|
// For the generated scripts, use Netty tcnative (i.e. OpenSSL).
|
|
// Note that OkHttp currently only supports ALPN, so OpenSSL version >= 1.0.2 is required.
|
|
|
|
def test_client = tasks.register("test_client", CreateStartScripts) {
|
|
mainClass = "io.grpc.testing.integration.TestServiceClient"
|
|
applicationName = "test-client"
|
|
outputDir = new File(project.buildDir, 'tmp/scripts/' + name)
|
|
classpath = startScripts.classpath
|
|
}
|
|
|
|
def test_server = tasks.register("test_server", CreateStartScripts) {
|
|
mainClass = "io.grpc.testing.integration.TestServiceServer"
|
|
applicationName = "test-server"
|
|
outputDir = new File(project.buildDir, 'tmp/scripts/' + name)
|
|
classpath = startScripts.classpath
|
|
}
|
|
|
|
def reconnect_test_client = tasks.register("reconnect_test_client", CreateStartScripts) {
|
|
mainClass = "io.grpc.testing.integration.ReconnectTestClient"
|
|
applicationName = "reconnect-test-client"
|
|
outputDir = new File(project.buildDir, 'tmp/scripts/' + name)
|
|
classpath = startScripts.classpath
|
|
}
|
|
|
|
def stresstest_client = tasks.register("stresstest_client", CreateStartScripts) {
|
|
mainClass = "io.grpc.testing.integration.StressTestClient"
|
|
applicationName = "stresstest-client"
|
|
outputDir = new File(project.buildDir, 'tmp/scripts/' + name)
|
|
classpath = startScripts.classpath
|
|
defaultJvmOpts = [
|
|
"-verbose:gc",
|
|
"-XX:+PrintFlagsFinal"
|
|
]
|
|
}
|
|
|
|
def http2_client = tasks.register("http2_client", CreateStartScripts) {
|
|
mainClass = "io.grpc.testing.integration.Http2Client"
|
|
applicationName = "http2-client"
|
|
outputDir = new File(project.buildDir, 'tmp/scripts/' + name)
|
|
classpath = startScripts.classpath
|
|
}
|
|
|
|
def grpclb_long_lived_affinity_test_client = tasks.register("grpclb_long_lived_affinity_test_client", CreateStartScripts) {
|
|
mainClass = "io.grpc.testing.integration.GrpclbLongLivedAffinityTestClient"
|
|
applicationName = "grpclb-long-lived-affinity-test-client"
|
|
outputDir = new File(project.buildDir, 'tmp/scripts/' + name)
|
|
classpath = startScripts.classpath
|
|
defaultJvmOpts = [
|
|
"-Dio.grpc.internal.DnsNameResolverProvider.enable_service_config=true"
|
|
]
|
|
}
|
|
|
|
def grpclb_fallback_test_client = tasks.register("grpclb_fallback_test_client", CreateStartScripts) {
|
|
mainClass = "io.grpc.testing.integration.GrpclbFallbackTestClient"
|
|
applicationName = "grpclb-fallback-test-client"
|
|
outputDir = new File(project.buildDir, 'tmp/scripts/' + name)
|
|
classpath = startScripts.classpath
|
|
defaultJvmOpts = [
|
|
"-Dio.grpc.internal.DnsNameResolverProvider.enable_service_config=true"
|
|
]
|
|
}
|
|
|
|
def xds_test_client = tasks.register("xds_test_client", CreateStartScripts) {
|
|
mainClass = "io.grpc.testing.integration.XdsTestClient"
|
|
applicationName = "xds-test-client"
|
|
outputDir = new File(project.buildDir, 'tmp/scripts/' + name)
|
|
classpath = startScripts.classpath
|
|
}
|
|
|
|
def xds_test_server = tasks.register("xds_test_server", CreateStartScripts) {
|
|
mainClass = "io.grpc.testing.integration.XdsTestServer"
|
|
applicationName = "xds-test-server"
|
|
outputDir = new File(project.buildDir, 'tmp/scripts/' + name)
|
|
classpath = startScripts.classpath
|
|
}
|
|
|
|
def xds_federation_test_client = tasks.register("xds_federation_test_client", CreateStartScripts) {
|
|
mainClass = "io.grpc.testing.integration.XdsFederationTestClient"
|
|
applicationName = "xds-federation-test-client"
|
|
outputDir = new File(project.buildDir, 'tmp/scripts/' + name)
|
|
classpath = startScripts.classpath
|
|
}
|
|
|
|
application {
|
|
applicationDistribution.into("bin") {
|
|
from(test_client)
|
|
from(test_server)
|
|
from(reconnect_test_client)
|
|
from(stresstest_client)
|
|
from(http2_client)
|
|
from(grpclb_long_lived_affinity_test_client)
|
|
from(grpclb_fallback_test_client)
|
|
from(xds_test_client)
|
|
from(xds_test_server)
|
|
from(xds_federation_test_client)
|
|
filePermissions {
|
|
unix(0755)
|
|
}
|
|
}
|
|
}
|
|
|
|
publishing {
|
|
publications {
|
|
maven(MavenPublication) {
|
|
artifact distZip
|
|
artifact distTar
|
|
}
|
|
}
|
|
}
|