blob: 371d6d2ee62bef5acd53e00ef3d804b32260619c [file] [log] [blame]
apply plugin: 'application'
description = "gRPC: Integration Testing"
startScripts.enabled = false
// Add dependency on the protobuf plugin
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath libraries.protobuf_plugin
}
}
configurations {
alpnboot
}
dependencies {
compile project(':grpc-core'),
project(':grpc-netty'),
project(':grpc-okhttp'),
project(':grpc-protobuf'),
project(':grpc-stub'),
project(':grpc-testing'),
libraries.junit,
libraries.mockito
alpnboot alpnboot_package_name
}
test {
jvmArgs "-Xbootclasspath/p:" + configurations.alpnboot.asPath
testLogging {
exceptionFormat "full"
showExceptions true
showCauses true
showStackTraces true
}
}
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")
}
}
}