grpc-java/interop-testing/build.gradle

73 lines
2.1 KiB
Groovy

apply plugin: 'application'
description = "gRPC: Integration Testing"
startScripts.enabled = false
// Add dependency on the protobuf plugin
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath libraries.protobuf_plugin
}
}
dependencies {
compile project(':grpc-auth'),
project(':grpc-core'),
project(':grpc-netty'),
project(':grpc-okhttp'),
project(':grpc-protobuf'),
project(':grpc-stub'),
project(':grpc-testing'),
libraries.junit,
libraries.mockito,
libraries.oauth_client
}
test {
jvmArgs "-Xbootclasspath/p:" + configurations.alpnboot.asPath
}
task test_client(type: CreateStartScripts) {
mainClassName = "io.grpc.testing.integration.TestServiceClient"
applicationName = "test-client"
defaultJvmOpts = ["-Xbootclasspath/p:" + configurations.alpnboot.asPath]
outputDir = new File(project.buildDir, 'tmp')
classpath = jar.outputs.files + project.configurations.runtime
}
task test_server(type: CreateStartScripts) {
mainClassName = "io.grpc.testing.integration.TestServiceServer"
applicationName = "test-server"
defaultJvmOpts = ["-Xbootclasspath/p:" + configurations.alpnboot.asPath]
outputDir = new File(project.buildDir, 'tmp')
classpath = jar.outputs.files + project.configurations.runtime
}
task reconnect_test_client(type: CreateStartScripts) {
mainClassName = "io.grpc.testing.integration.ReconnectTestClient"
applicationName = "reconnect-test-client"
defaultJvmOpts = ["-Xbootclasspath/p:" + configurations.alpnboot.asPath]
outputDir = new File(project.buildDir, 'tmp')
classpath = jar.outputs.files + project.configurations.runtime
}
applicationDistribution.into("bin") {
from(test_client)
from(test_server)
from(reconnect_test_client)
fileMode = 0755
}
configureProtoCompilation()
// Let intellij projects refer to generated code
idea {
module {
sourceDirs += file("${projectDir}/src/generated/main/java");
sourceDirs += file("${projectDir}/src/generated/main/grpc");
}
}