mirror of https://github.com/grpc/grpc-java.git
57 lines
1.5 KiB
Groovy
57 lines
1.5 KiB
Groovy
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
|
|
}
|
|
|
|
// 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)
|
|
}
|
|
}
|
|
|
|
// 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")
|
|
}
|
|
}
|
|
}
|