Skip to content

Gradle config multiproject shared modules #638

@JavierSegoviaCordoba

Description

@JavierSegoviaCordoba

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
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions