-
Notifications
You must be signed in to change notification settings - Fork 31
Kmp Source Sets for gRPC #402
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Mr3zee
wants to merge
13
commits into
grpc-release
Choose a base branch
from
grpc/kmp-sources
base: grpc-release
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
+2,493
−368
Conversation
This file contains hidden or 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
e5l
approved these changes
Jul 23, 2025
return property | ||
} | ||
|
||
// TODO change to commonMain/commonTest in docs when it's supported |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please add link to an issue
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Subsystem
Gradle Plugin
Problem Description
Current solution uses
com.google.protobuf
plugin.It is limiting in different ways:
Options:
protoc
binarybuilf.buf
Gradle pluginProvider
APISolution
Blend of Buf's great capabilities to manage proto files and our Gradle plugin to manage Buf.
We use Buf's executable but we configure its workspace using our Gradle tasks:
src/main/proto
andsrc/test/proto
directory setssrc/jvmMain/proto
andsrc/jvmTest/proto
directory setssrc/commonMain/proto
andsrc/commonTest/proto
directory sets laternativeMain
,jsMain
, etc)protoSourceSets
extensionprotoSourceSets.jvmTest { proto.exclude("exclude/**") }
protoSourceSets.jvmTest { protocPlugin(rpc.grpc.protocPlugins.kxrpc) }
buf.yaml
andbuf.gen.yaml
filesbuf.yaml
defines modules:proto
for files to be used for generation (in bothmain
andtest
sets)import
for files used as imported (resolvable but not used for generation) - used intest
sets to import proto files frommain
buf.gen.yaml
defines plugins:rpc.grpc.protocPlugins
container.kxrpc
,protobufJava
,grpcJava
andgrpcKotlin
ProtocPlugin
classjava
source setsrpc.grpc.protocPlugins
container.generateBufYaml<sourceSet>
- generatesbuf.yaml
generateBufGenYaml<sourceSet>
- generatesbuf.gen.yaml
processProtoFiles<sourceSet>
- copies proto files to the workspace directorybufGenerate<sourceSet>
- runsbuf generate
commandbuf
tasks can be customised usingrpc.grpc.buf
extension.buf generate
task can be customised usingrpc.grpc.buf.generate
extension.buf generate
task is supported out-of-the-boxregisterBufExecTask
rpc.grpc.buf.tasks.registerWorkspaceTask
lint
without explicit support from us--debug
optionjava.home
or a user specified java executableNext steps
Comming in next PRs in no particular order and with no particular deadlines: