blob: 3626aedf907a83a9ab05587ca6cf08ec1fd6f3b9 (
plain)
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
|
plugins {
id "com.google.protobuf" version "0.9.2"
id "java"
id "net.idlestate.gradle-duplicate-classes-check" version "1.2.0"
}
group 'com.gitlab.techschool'
version '1.0-SNAPSHOT'
java {
toolchain {
languageVersion = JavaLanguageVersion.of(11)
}
}
repositories {
mavenCentral()
}
dependencies {
testImplementation group: 'junit', name: 'junit', version: '4.13.2'
implementation group: 'com.google.protobuf', name: 'protobuf-java', version: '3.22.0'
// implementation group: 'io.grpc', name: 'grpc-all', version: '1.53.0'
}
sourceSets {
main {
proto {
srcDir 'src/main/proto/messages'
include '**/*.proto'
}
java {
srcDirs 'src/main/java' // Changed 'main/java' to 'src/main/java'
}
}
}
protobuf {
// generatedFilesBaseDir = "src/"
protoc {
artifact = 'com.google.protobuf:protoc:3.22.0'
}
plugins {
grpc {
artifact = 'io.grpc:protoc-gen-grpc-java:1.53.0'
}
doc {
artifact = "io.github.pseudomuto:protoc-gen-doc:1.5.1"
}
}
generateProtoTasks {
all().each { task ->
task.builtins {
java {
outputSubDir = 'src/main/java'
}
cpp {}
}
task.plugins {
doc {
option 'html, v2c.html'
}
}
}
processResources {
duplicatesStrategy = 'EXCLUDE'
}
}
}
|