Skip to content

Instantly share code, notes, and snippets.

@kyze8439690
Created December 21, 2021 16:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kyze8439690/1afc40dae6ba59f8de5041dd7cecacd3 to your computer and use it in GitHub Desktop.
Save kyze8439690/1afc40dae6ba59f8de5041dd7cecacd3 to your computer and use it in GitHub Desktop.
Protobuf gradle plugin with gradle kotlin dsl
import com.google.protobuf.gradle.*
plugins {
id("com.google.protobuf") version "0.8.18"
}
protobuf {
protoc {
artifact = "com.google.protobuf:protoc:3.19.1"
}
generateProtoTasks {
all().forEach { task ->
task.plugins {
id("kotlin")
}
task.builtins {
id("java")
}
}
}
}
dependencies {
implementation("com.google.protobuf:protobuf-kotlin:3.19.1")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment