-
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.
The path of the java executable can now be configured in the ProtobufExtension and/or specific GenerateProtoTask instances. * GenerateProtoTask gains the javaExecutablePath Property, * ProtobufExtension gains the javaExecutablePath Property and the defaultJavaExecutablePath provider, which provides the default path using the same logic as previous versions * computeJavaExePath moved from GenerateProtoTask to ProtobufExtension since it is now only used in ProtobufExtension * isWindows moved from GenerateProtoTask to Util since it is now used in GenerateProtoTask and ProtobufExtension
- Loading branch information
1 parent
ee41e2f
commit 12ad318
Showing
7 changed files
with
171 additions
and
20 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
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; | ||
} |