Skip to content

Commit

Permalink
fix: Descriptor *.pb path. (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
EdwinBetanc0urt authored Jan 25, 2024
1 parent b713da8 commit cd142b2
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 31 deletions.
62 changes: 32 additions & 30 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -41,39 +41,41 @@ repositories {
}
}
}

protobuf {
protoc {
artifact = "com.google.protobuf:protoc:3.12.0"
}
plugins {
grpc {
artifact = 'io.grpc:protoc-gen-grpc-java:1.34.1'
}
}
generateProtoTasks {
all()*.plugins {
grpc {}
}
all().configureEach { task ->
// If true, will generate a descriptor_set.desc file under
// task.outputBaseDir. Default is false.
// See --descriptor_set_out in protoc documentation about what it is.
task.generateDescriptorSet = true
protoc {
artifact = "com.google.protobuf:protoc:3.12.0"
}
plugins {
grpc {
artifact = 'io.grpc:protoc-gen-grpc-java:1.34.1'
}
}
generateProtoTasks {
all()*.plugins {
grpc {}
}
all().configureEach { task ->
// If true, will generate a descriptor_set.desc file under
// task.outputBaseDir. Default is false.
// See --descriptor_set_out in protoc documentation about what it is.
task.generateDescriptorSet = true

// Allows to override the default for the descriptor set location
task.descriptorSetOptions.path =
"${projectDir}/build/descriptors/adempiere-grpc-template-service-service.pb"
// If true, the descriptor set will contain line number information
// and comments. Default is false.
task.descriptorSetOptions.includeSourceInfo = true
// If true, the descriptor set will contain all transitive imports and
// is therefore self-contained. Default is false.
task.descriptorSetOptions.includeImports = true
}
}
task.descriptorSetOptions.path =
"${projectDir}/build/descriptors/adempiere-grpc-template-service.pb"

// If true, the descriptor set will contain line number information
// and comments. Default is false.
task.descriptorSetOptions.includeSourceInfo = true

// If true, the descriptor set will contain all transitive imports and
// is therefore self-contained. Default is false.
task.descriptorSetOptions.includeImports = true
}
}
}

sourceSets {
main {
java {
Expand Down
2 changes: 1 addition & 1 deletion docker/grpc_proxy.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ WORKDIR /etc/envoy/
COPY docker/envoy_template.yaml /etc/envoy/envoy_template.yaml

# Proto gRPC descriptor
COPY docker/adempiere-grpc-template-service-service.pb /data/descriptor.pb
COPY docker/adempiere-grpc-template-service.pb /data/descriptor.pb
COPY docker/start_grpc_proxy.sh /etc/envoy/start.sh


Expand Down

0 comments on commit cd142b2

Please sign in to comment.