Last active
January 28, 2022 12:03
-
-
Save gildor/cf37ebb30cd8cf43b65cc70a055ec017 to your computer and use it in GitHub Desktop.
Protobuf Gradle Plugin + Kotlin DSL
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.google.protobuf.gradle.protobuf | |
import com.google.protobuf.gradle.protoc | |
plugins { | |
java | |
idea | |
id("com.google.protobuf") version "0.8.7" | |
} | |
repositories { | |
mavenCentral() | |
} | |
val protobufVersion = "3.6.1" | |
dependencies { | |
compile("com.google.protobuf:protobuf-java:$protobufVersion") | |
if (JavaVersion.current().isJava9Compatible) { | |
implementation("javax.annotation:javax.annotation-api:+") | |
} | |
} | |
protobuf { | |
protoc { | |
artifact = "com.google.protobuf:protoc:$protobufVersion" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment