-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
82 lines (72 loc) · 2.01 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
73
74
75
76
77
78
79
80
81
82
plugins {
id("com.github.johnrengelman.shadow") version "7.0.0"
id("io.micronaut.application") version "1.5.0"
id("com.google.protobuf") version "0.8.18"
id("com.diffplug.spotless") version '5.12.0'
}
version = "0.1"
group = "com.github.taehoio.baemincrypto"
repositories {
mavenCentral()
}
micronaut {
testRuntime("junit5")
processing {
incremental(true)
annotations("com.github.taehoio.baemincrypto.*")
}
}
dependencies {
implementation("io.micronaut:micronaut-runtime")
implementation("io.micronaut.grpc:micronaut-grpc-runtime")
implementation("javax.annotation:javax.annotation-api")
implementation('io.grpc:grpc-protobuf:1.43.1')
implementation("io.grpc:grpc-stub:1.43.1")
runtimeOnly("ch.qos.logback:logback-classic")
implementation("io.micronaut:micronaut-validation")
testImplementation("io.micronaut:micronaut-http-client")
testImplementation("org.assertj:assertj-core:3.16.1")
}
application {
mainClass.set("com.github.taehoio.baemincrypto.Application")
}
shadowJar {
mergeServiceFiles()
}
java {
sourceCompatibility = JavaVersion.toVersion("11")
targetCompatibility = JavaVersion.toVersion("11")
}
sourceSets {
main {
proto {
srcDir("src/main/idl")
}
java {
srcDirs("build/generated/source/proto/main/grpc")
srcDirs("build/generated/source/proto/main/java")
}
}
}
protobuf {
protoc { artifact = "com.google.protobuf:protoc:3.19.2" }
plugins {
grpc { artifact = "io.grpc:protoc-gen-grpc-java:1.43.1" }
}
generateProtoTasks {
all()*.plugins { grpc {} }
}
}
spotless {
java {
target project.fileTree(project.rootDir) {
include '**/*.java'
exclude '**/generated/**/*.*'
}
googleJavaFormat()
// to have 4 spaces indent with google java style guide.
// https://github.com/diffplug/spotless/issues/317
indentWithTabs(2)
indentWithSpaces(4)
}
}