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
}
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 onprotos.client: Only generate the client related code, it uses the messages generated code frommodels. It depends onmodelsyprotos.server: Only generate the server related code, it uses the messages generated code frommodels. It depends onmodelsandprotosTo 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 }