forked from quarkusio/quarkus
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Options for generating gRPC descriptor set
- Loading branch information
Showing
43 changed files
with
955 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
33 changes: 33 additions & 0 deletions
33
...ion-tests/gradle/src/main/resources/grpc-descriptor-set-alternate-output-dir/build.gradle
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,33 @@ | ||
plugins { | ||
id 'java' | ||
id 'io.quarkus' | ||
} | ||
|
||
repositories { | ||
mavenLocal { | ||
content { | ||
includeGroupByRegex 'io.quarkus.*' | ||
includeGroup 'org.hibernate.orm' | ||
} | ||
} | ||
mavenCentral() | ||
gradlePluginPortal() | ||
} | ||
|
||
dependencies { | ||
implementation enforcedPlatform("${quarkusPlatformGroupId}:${quarkusPlatformArtifactId}:${quarkusPlatformVersion}") | ||
implementation 'io.quarkus:quarkus-resteasy' | ||
implementation 'io.quarkus:quarkus-grpc' | ||
} | ||
|
||
group 'org.acme' | ||
version '1.0.0-SNAPSHOT' | ||
|
||
java { | ||
sourceCompatibility = JavaVersion.VERSION_11 | ||
targetCompatibility = JavaVersion.VERSION_11 | ||
} | ||
|
||
test { | ||
systemProperty "java.util.logging.manager", "org.jboss.logmanager.LogManager" | ||
} |
2 changes: 2 additions & 0 deletions
2
...ests/gradle/src/main/resources/grpc-descriptor-set-alternate-output-dir/gradle.properties
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,2 @@ | ||
quarkusPlatformArtifactId=quarkus-bom | ||
quarkusPlatformGroupId=io.quarkus |
16 changes: 16 additions & 0 deletions
16
...-tests/gradle/src/main/resources/grpc-descriptor-set-alternate-output-dir/settings.gradle
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,16 @@ | ||
pluginManagement { | ||
repositories { | ||
mavenLocal { | ||
content { | ||
includeGroupByRegex 'io.quarkus.*' | ||
includeGroup 'org.hibernate.orm' | ||
} | ||
} | ||
mavenCentral() | ||
gradlePluginPortal() | ||
} | ||
plugins { | ||
id 'io.quarkus' version "${quarkusPluginVersion}" | ||
} | ||
} | ||
rootProject.name = 'grpc-descriptor-set-alternate-output-dir' |
21 changes: 21 additions & 0 deletions
21
...criptor-set-alternate-output-dir/src/main/java/org/acme/quarkus/sample/HelloResource.java
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,21 @@ | ||
package org.acme.quarkus.sample; | ||
|
||
import jakarta.inject.Inject; | ||
import jakarta.ws.rs.GET; | ||
import jakarta.ws.rs.Path; | ||
import jakarta.ws.rs.Produces; | ||
import jakarta.ws.rs.core.MediaType; | ||
|
||
import io.quarkus.example.HelloMsg; | ||
|
||
@Path("/hello") | ||
public class HelloResource { | ||
|
||
@GET | ||
@Produces(MediaType.TEXT_PLAIN) | ||
public String hello() { | ||
Integer number = HelloMsg.Status.TEST_ONE.getNumber(); | ||
// return a thing from proto file (for devmode test) | ||
return "hello " + number; | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
...le/src/main/resources/grpc-descriptor-set-alternate-output-dir/src/main/proto/hello.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,23 @@ | ||
syntax = "proto3"; | ||
package io.quarkus.example; | ||
|
||
option java_multiple_files = true; | ||
option java_package = "io.quarkus.example"; | ||
|
||
import "google/protobuf/timestamp.proto"; | ||
|
||
|
||
message HelloMsg { | ||
enum Status { | ||
UNKNOWN = 0; | ||
NOT_SERVING = 1; | ||
TEST_ONE = 2; | ||
} | ||
string message = 1; | ||
google.protobuf.Timestamp date_time = 2; | ||
Status status = 3; | ||
} | ||
|
||
service DevModeService { | ||
rpc Check(HelloMsg) returns (HelloMsg); | ||
} |
3 changes: 3 additions & 0 deletions
3
...ources/grpc-descriptor-set-alternate-output-dir/src/main/resources/application.properties
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,3 @@ | ||
quarkus.generate-code.grpc.descriptor-set.generate=true | ||
quarkus.generate-code.grpc.descriptor-set.name=hello.dsc | ||
quarkus.generate-code.grpc.descriptor-set.output-dir=proto |
33 changes: 33 additions & 0 deletions
33
...gration-tests/gradle/src/main/resources/grpc-descriptor-set-alternate-output/build.gradle
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,33 @@ | ||
plugins { | ||
id 'java' | ||
id 'io.quarkus' | ||
} | ||
|
||
repositories { | ||
mavenLocal { | ||
content { | ||
includeGroupByRegex 'io.quarkus.*' | ||
includeGroup 'org.hibernate.orm' | ||
} | ||
} | ||
mavenCentral() | ||
gradlePluginPortal() | ||
} | ||
|
||
dependencies { | ||
implementation enforcedPlatform("${quarkusPlatformGroupId}:${quarkusPlatformArtifactId}:${quarkusPlatformVersion}") | ||
implementation 'io.quarkus:quarkus-resteasy' | ||
implementation 'io.quarkus:quarkus-grpc' | ||
} | ||
|
||
group 'org.acme' | ||
version '1.0.0-SNAPSHOT' | ||
|
||
java { | ||
sourceCompatibility = JavaVersion.VERSION_11 | ||
targetCompatibility = JavaVersion.VERSION_11 | ||
} | ||
|
||
test { | ||
systemProperty "java.util.logging.manager", "org.jboss.logmanager.LogManager" | ||
} |
2 changes: 2 additions & 0 deletions
2
...on-tests/gradle/src/main/resources/grpc-descriptor-set-alternate-output/gradle.properties
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,2 @@ | ||
quarkusPlatformArtifactId=quarkus-bom | ||
quarkusPlatformGroupId=io.quarkus |
16 changes: 16 additions & 0 deletions
16
...tion-tests/gradle/src/main/resources/grpc-descriptor-set-alternate-output/settings.gradle
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,16 @@ | ||
pluginManagement { | ||
repositories { | ||
mavenLocal { | ||
content { | ||
includeGroupByRegex 'io.quarkus.*' | ||
includeGroup 'org.hibernate.orm' | ||
} | ||
} | ||
mavenCentral() | ||
gradlePluginPortal() | ||
} | ||
plugins { | ||
id 'io.quarkus' version "${quarkusPluginVersion}" | ||
} | ||
} | ||
rootProject.name = 'grpc-descriptor-set-alternate-output' |
21 changes: 21 additions & 0 deletions
21
...-descriptor-set-alternate-output/src/main/java/org/acme/quarkus/sample/HelloResource.java
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,21 @@ | ||
package org.acme.quarkus.sample; | ||
|
||
import jakarta.inject.Inject; | ||
import jakarta.ws.rs.GET; | ||
import jakarta.ws.rs.Path; | ||
import jakarta.ws.rs.Produces; | ||
import jakarta.ws.rs.core.MediaType; | ||
|
||
import io.quarkus.example.HelloMsg; | ||
|
||
@Path("/hello") | ||
public class HelloResource { | ||
|
||
@GET | ||
@Produces(MediaType.TEXT_PLAIN) | ||
public String hello() { | ||
Integer number = HelloMsg.Status.TEST_ONE.getNumber(); | ||
// return a thing from proto file (for devmode test) | ||
return "hello " + number; | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
...gradle/src/main/resources/grpc-descriptor-set-alternate-output/src/main/proto/hello.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,23 @@ | ||
syntax = "proto3"; | ||
package io.quarkus.example; | ||
|
||
option java_multiple_files = true; | ||
option java_package = "io.quarkus.example"; | ||
|
||
import "google/protobuf/timestamp.proto"; | ||
|
||
|
||
message HelloMsg { | ||
enum Status { | ||
UNKNOWN = 0; | ||
NOT_SERVING = 1; | ||
TEST_ONE = 2; | ||
} | ||
string message = 1; | ||
google.protobuf.Timestamp date_time = 2; | ||
Status status = 3; | ||
} | ||
|
||
service DevModeService { | ||
rpc Check(HelloMsg) returns (HelloMsg); | ||
} |
2 changes: 2 additions & 0 deletions
2
.../resources/grpc-descriptor-set-alternate-output/src/main/resources/application.properties
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,2 @@ | ||
quarkus.generate-code.grpc.descriptor-set.generate=true | ||
quarkus.generate-code.grpc.descriptor-set.name=hello.dsc |
33 changes: 33 additions & 0 deletions
33
integration-tests/gradle/src/main/resources/grpc-descriptor-set/build.gradle
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,33 @@ | ||
plugins { | ||
id 'java' | ||
id 'io.quarkus' | ||
} | ||
|
||
repositories { | ||
mavenLocal { | ||
content { | ||
includeGroupByRegex 'io.quarkus.*' | ||
includeGroup 'org.hibernate.orm' | ||
} | ||
} | ||
mavenCentral() | ||
gradlePluginPortal() | ||
} | ||
|
||
dependencies { | ||
implementation enforcedPlatform("${quarkusPlatformGroupId}:${quarkusPlatformArtifactId}:${quarkusPlatformVersion}") | ||
implementation 'io.quarkus:quarkus-resteasy' | ||
implementation 'io.quarkus:quarkus-grpc' | ||
} | ||
|
||
group 'org.acme' | ||
version '1.0.0-SNAPSHOT' | ||
|
||
java { | ||
sourceCompatibility = JavaVersion.VERSION_11 | ||
targetCompatibility = JavaVersion.VERSION_11 | ||
} | ||
|
||
test { | ||
systemProperty "java.util.logging.manager", "org.jboss.logmanager.LogManager" | ||
} |
2 changes: 2 additions & 0 deletions
2
integration-tests/gradle/src/main/resources/grpc-descriptor-set/gradle.properties
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,2 @@ | ||
quarkusPlatformArtifactId=quarkus-bom | ||
quarkusPlatformGroupId=io.quarkus |
16 changes: 16 additions & 0 deletions
16
integration-tests/gradle/src/main/resources/grpc-descriptor-set/settings.gradle
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,16 @@ | ||
pluginManagement { | ||
repositories { | ||
mavenLocal { | ||
content { | ||
includeGroupByRegex 'io.quarkus.*' | ||
includeGroup 'org.hibernate.orm' | ||
} | ||
} | ||
mavenCentral() | ||
gradlePluginPortal() | ||
} | ||
plugins { | ||
id 'io.quarkus' version "${quarkusPluginVersion}" | ||
} | ||
} | ||
rootProject.name = 'grpc-descriptor-set' |
21 changes: 21 additions & 0 deletions
21
...in/resources/grpc-descriptor-set/src/main/java/org/acme/quarkus/sample/HelloResource.java
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,21 @@ | ||
package org.acme.quarkus.sample; | ||
|
||
import jakarta.inject.Inject; | ||
import jakarta.ws.rs.GET; | ||
import jakarta.ws.rs.Path; | ||
import jakarta.ws.rs.Produces; | ||
import jakarta.ws.rs.core.MediaType; | ||
|
||
import io.quarkus.example.HelloMsg; | ||
|
||
@Path("/hello") | ||
public class HelloResource { | ||
|
||
@GET | ||
@Produces(MediaType.TEXT_PLAIN) | ||
public String hello() { | ||
Integer number = HelloMsg.Status.TEST_ONE.getNumber(); | ||
// return a thing from proto file (for devmode test) | ||
return "hello " + number; | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
integration-tests/gradle/src/main/resources/grpc-descriptor-set/src/main/proto/hello.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,23 @@ | ||
syntax = "proto3"; | ||
package io.quarkus.example; | ||
|
||
option java_multiple_files = true; | ||
option java_package = "io.quarkus.example"; | ||
|
||
import "google/protobuf/timestamp.proto"; | ||
|
||
|
||
message HelloMsg { | ||
enum Status { | ||
UNKNOWN = 0; | ||
NOT_SERVING = 1; | ||
TEST_ONE = 2; | ||
} | ||
string message = 1; | ||
google.protobuf.Timestamp date_time = 2; | ||
Status status = 3; | ||
} | ||
|
||
service DevModeService { | ||
rpc Check(HelloMsg) returns (HelloMsg); | ||
} |
1 change: 1 addition & 0 deletions
1
...s/gradle/src/main/resources/grpc-descriptor-set/src/main/resources/application.properties
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 @@ | ||
quarkus.generate-code.grpc.descriptor-set.generate=true |
Oops, something went wrong.