blob: 2093b9d8e2abd00cf202cee0d238a77e4d948756 [file] [log] [blame]
zhangkun9de8e4b2015-01-15 10:29:05 -08001apply plugin: "cpp"
2
zhangkun835e607852015-01-22 12:31:56 -08003description = 'The protoc plugin for gRPC Java'
4
zhangkun9de8e4b2015-01-15 10:29:05 -08005executables {
6 java_plugin {}
7}
8
9binaries.all {
10 if (toolChain in Gcc) {
11 cppCompiler.args "-std=c++11"
12 linker.args "-lprotoc", "-lprotobuf"
13 }
14}
15
16sources {
17 java_plugin {
18 // Configure an existing CppSourceSet
19 cpp {
20 source {
21 srcDirs "src/"
22 include "**/*.cc"
23 }
24 }
25 }
26}
27
zhangkun835e607852015-01-22 12:31:56 -080028task test(type: Exec, dependsOn: 'java_pluginExecutable') {
29 environment 'TEST_TMP_DIR', temporaryDir
30 commandLine './run_test.sh'
31}