grpc-kotlin
grpc-kotlin copied to clipboard
Gradle config multiproject shared modules
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 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 onmodelsandprotos
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
}