-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
60 lines (53 loc) · 1.12 KB
/
build.gradle.kts
File metadata and controls
60 lines (53 loc) · 1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
import com.google.protobuf.gradle.id
plugins {
id("java")
id("com.google.protobuf") version "0.9.5"
id("maven-publish")
}
repositories {
mavenCentral()
}
dependencies {
implementation("com.google.protobuf:protobuf-java:4.32.0")
implementation("com.google.protobuf:protobuf-java-util:4.32.0")
implementation("com.google.code.gson:gson:2.9.1")
implementation("org.jspecify:jspecify:1.0.0")
}
protobuf {
// https://github.com/google/protobuf-gradle-plugin/blob/master/examples/exampleKotlinDslProject/build.gradle.kts
protoc {
artifact = "com.google.protobuf:protoc:4.32.0"
}
plugins {
id("grpc") {
artifact = "io.grpc:protoc-gen-grpc-java:1.74.0"
}
id("doc") {
artifact = "io.github.pseudomuto:protoc-gen-doc:1.5.1"
}
}
generateProtoTasks {
ofSourceSet("main").forEach {
it.plugins {
id("grpc") { }
id("doc") {
option("markdown,docs/api/proto.md")
}
}
}
}
}
java {
withJavadocJar()
withSourcesJar()
}
publishing {
publications {
create<MavenPublication>("proto") {
from(components["java"])
groupId = "com.mcdiamondfire"
artifactId = "proto"
version = "1.0.0"
}
}
}