blob: af10ed3c9e9509b9825226250bb4f15b2b66db0e [file] [log] [blame]
apply plugin: 'protobuf'
apply plugin:'application'
description = "gRPC: Integration Testing"
// 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-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
}
}
// Allow execution of test client and server.
task execute(dependsOn: classes, type:JavaExec) {
main = project.hasProperty('mainClass') ? project.mainClass : ''
classpath = sourceSets.main.runtimeClasspath
jvmArgs = ["-Xbootclasspath/p:" + configurations.alpnboot.asPath]
workingDir = project.rootDir
// If appArgs were provided, set the program arguments.
if (project.hasProperty("appArgs")) {
args = Eval.me(appArgs)
}
}
protobufCodeGenPlugins = ["java_plugin:$javaPluginPath"]
generateProto.dependsOn ':grpc-compiler:java_pluginExecutable'
// 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")
}
}
}