mirror of https://github.com/grpc/grpc-java.git
69 lines
1.9 KiB
Groovy
69 lines
1.9 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
|
|
}
|
|
|
|
applicationDistribution.into("bin") {
|
|
from(test_client)
|
|
from(test_server)
|
|
fileMode = 0755
|
|
}
|
|
|
|
configureProtoCompilation()
|
|
|
|
// Allow intellij projects to refer to generated-sources
|
|
idea {
|
|
module {
|
|
// The whole build dir is excluded by default, but we need build/generated-sources,
|
|
// which contains the generated proto classes.
|
|
excludeDirs = [file('.gradle')]
|
|
if (buildDir.exists()) {
|
|
excludeDirs += files(buildDir.listFiles())
|
|
excludeDirs -= file("$buildDir/generated-sources")
|
|
}
|
|
}
|
|
}
|