grpc-kotlin icon indicating copy to clipboard operation
grpc-kotlin copied to clipboard

Gradle config multiproject shared modules

Open JavierSegoviaCordoba opened this issue 8 months ago • 0 comments
trafficstars

I am struggling to get the next project structure in Gradle with Kotlin.

  • protos: Only contains the proto files, it is a java library without any codegen.
  • models: Only contains the messages generated code, including the Kotlin DSL. No server/client code should be here. It depends on protos.
  • client: Only generate the client related code, it uses the messages generated code from models. It depends on models y protos.
  • server: Only generate the server related code, it uses the messages generated code from models. It depends on models and protos

To be honest, I understand that the current Gradle plugin is really flexible and it allows to do whatever you want, but most projects should only need something like this in the Gradle DSL:

protos {
    messages = true
    client = true
    server = false
}

JavierSegoviaCordoba avatar Mar 02 '25 13:03 JavierSegoviaCordoba