-
Notifications
You must be signed in to change notification settings - Fork 275
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add tests for configuration of java executable
- Loading branch information
1 parent
35e4908
commit b729027
Showing
4 changed files
with
131 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
plugins { | ||
id 'java' | ||
id 'com.google.protobuf' | ||
} | ||
repositories { mavenCentral() } | ||
dependencies { | ||
implementation 'com.google.protobuf:protobuf-java:3.0.0' | ||
} | ||
protobuf { | ||
protoc { | ||
artifact = 'com.google.protobuf:protoc:3.0.0' | ||
} | ||
plugins { | ||
grpc { artifact = 'io.grpc:protoc-gen-grpc-java:1.0.3' } | ||
grpcKotlin { artifact = 'io.grpc:protoc-gen-grpc-kotlin:1.4.1:jdk8@jar' } | ||
} | ||
generateProtoTasks { | ||
all().configureEach { task -> | ||
task.plugins { | ||
grpc {} | ||
grpcKotlin {} | ||
} | ||
} | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
testProjectConfigureJavaExecutable/src/main/proto/com/example/tutorial/sample.proto
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
|
||
syntax = "proto3"; | ||
|
||
option java_package = "com.example.tutorial"; | ||
option java_outer_classname = "OuterSample"; | ||
option java_multiple_files = true; | ||
|
||
message Msg { | ||
string foo = 1; | ||
SecondMsg blah = 2; | ||
} | ||
|
||
message SecondMsg { | ||
int32 blah = 1; | ||
} |