-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
72 lines (62 loc) · 1.74 KB
/
build.gradle
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
65
66
67
68
69
70
71
72
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.12'
}
}
plugins {
id 'scala'
id 'application'
}
apply plugin: 'com.google.protobuf'
repositories {
jcenter()
}
dependencies {
implementation 'org.scala-lang:scala-library:2.13.4'
implementation 'com.linecorp.armeria:armeria-grpc:1.3.0'
implementation 'com.linecorp.armeria:armeria-scalapb_2.13:1.3.0'
implementation "com.thesamet.scalapb:scalapb-runtime_2.13:0.10.9"
implementation "com.thesamet.scalapb:scalapb-runtime-grpc_2.13:0.10.9"
implementation "io.projectreactor:reactor-scala-extensions_2.13:0.8.0"
implementation "com.salesforce.servicelibs:reactor-grpc-stub:1.0.1"
testImplementation "org.scalameta:munit_2.13:0.7.19"
runtimeOnly 'org.slf4j:slf4j-simple:1.7.30'
}
application {
mainClassName = 'example.armeria.Main'
}
protobuf {
protoc {
artifact = "com.google.protobuf:protoc:3.12.0"
}
plugins {
def isWindows = org.gradle.internal.os.OperatingSystem.current() == org.gradle.internal.os.OperatingSystem.WINDOWS
def artifactName = "kr.ikhoon.scalapb-reactor:protoc-gen-scalapb-reactor:0.1.0-SNAPSHOT:"
artifactName += isWindows ? "windows@bat" : "unix@sh"
scalapb {
artifact = artifactName
}
}
generateProtoTasks {
all().each { task ->
task.builtins {
remove java
}
task.plugins {
scalapb {
option 'grpc'
}
}
}
}
}
sourceSets {
main {
scala {
srcDirs "${protobuf.generatedFilesBaseDir}/main/scalapb"
}
}
}