Skip to content
This repository was archived by the owner on Sep 22, 2022. It is now read-only.

Commit fc58d41

Browse files
authored
Merge pull request #28 from krmahadevan/fix_issue_27
Prune service classes before processing them
2 parents e830694 + 54da68f commit fc58d41

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

build.gradle

+8
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,14 @@ task generateJava(type: Copy) {
8181
println "Parsed package = [$pkg], serviceName = [$serviceName] and fullServiceName = [$fullServiceName]"
8282

8383
def text = file.text
84+
85+
// Even though the file name looked like a grpc service class, dont process it
86+
// if you dont find a reference to an abstract class.
87+
if (text.indexOf('public static abstract class') == -1) {
88+
println "Skipping processing $file.path because its not a Service class."
89+
return
90+
}
91+
8492
def rpcMethodAnnotation = "@io.grpc.stub.annotations.RpcMethod("
8593
Map<String, String> respTypes = new HashMap<>()
8694
Map<String, String> methodTypes = new HashMap<>()

0 commit comments

Comments
 (0)