-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
64 lines (56 loc) · 1.55 KB
/
build.gradle.kts
File metadata and controls
64 lines (56 loc) · 1.55 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
61
62
63
64
import com.google.protobuf.gradle.*
plugins {
id("com.google.protobuf") version "0.9.4"
kotlin("jvm") version "2.1.10"
`maven-publish`
}
group = "com.bluedragonmc"
repositories {
mavenCentral()
}
val grpcKotlinVersion = "1.4.1"
val protoVersion = "4.30.1"
val grpcVersion = "1.71.0"
dependencies {
implementation("io.grpc:grpc-stub:$grpcVersion")
implementation("io.grpc:grpc-kotlin-stub:$grpcKotlinVersion")
implementation("io.grpc:grpc-protobuf:$grpcVersion")
implementation("com.google.protobuf:protobuf-java:$protoVersion")
implementation("com.google.protobuf:protobuf-kotlin:$protoVersion")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4")
compileOnly("javax.annotation:javax.annotation-api:1.3.2")
}
protobuf {
protoc {
artifact = "com.google.protobuf:protoc:$protoVersion"
}
plugins {
id("grpc") {
artifact = "io.grpc:protoc-gen-grpc-java:$grpcVersion"
}
id("grpckt") {
artifact = "io.grpc:protoc-gen-grpc-kotlin:$grpcKotlinVersion:jdk8@jar"
}
}
generateProtoTasks {
ofSourceSet("main").forEach {
it.plugins {
id("grpc") { }
id("grpckt") { }
}
it.builtins {
id("kotlin")
}
}
}
}
publishing {
publications {
create<MavenPublication>("maven") {
groupId = "com.bluedragonmc"
artifactId = "rpc"
version = "1.0"
from(components["java"])
}
}
}