-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
63 lines (53 loc) · 2.17 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
plugins {
id 'application'
id 'com.google.protobuf' version "0.8.6"
}
repositories {
mavenCentral()
}
dependencies {
compile group: 'com.google.protobuf', name: 'protobuf-java', version: '3.6.0'
compile group: 'com.google.protobuf', name: 'protobuf-java-util', version: '3.6.0'
compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.9.6'
compile group: 'com.fasterxml.jackson.core', name: 'jackson-annotations', version: '2.9.6'
compile group: 'com.hubspot.jackson', name: 'jackson-datatype-protobuf', version: '0.9.9-jackson2.9-proto3'
}
startScripts.enabled = false
task fieldMask(type: CreateStartScripts) {
mainClassName = 'me.kunzhou.protobuf_examples.field_mask.App'
applicationName = 'fieldmask'
outputDir = new File(project.buildDir, 'tmp')
classpath = jar.outputs.files + project.configurations.runtime
}
task oneof(type: CreateStartScripts) {
mainClassName = 'me.kunzhou.protobuf_examples.oneof.App'
applicationName = 'oneof'
outputDir = new File(project.buildDir, 'tmp')
classpath = jar.outputs.files + project.configurations.runtime
}
task nullabilityAndPresense(type: CreateStartScripts) {
mainClassName = 'me.kunzhou.protobuf_examples.nullability_and_presense.App'
applicationName = 'nullability-and-presense'
outputDir = new File(project.buildDir, 'tmp')
classpath = jar.outputs.files + project.configurations.runtime
}
task jsonToProtobuf(type: CreateStartScripts) {
mainClassName = 'me.kunzhou.protobuf_examples.json_to_protobuf.App'
applicationName = 'json-to-protobuf'
outputDir = new File(project.buildDir, 'tmp')
classpath = jar.outputs.files + project.configurations.runtime
}
task jacksonJsonToProtobuf(type: CreateStartScripts) {
mainClassName = 'me.kunzhou.protobuf_examples.jackson_json_to_protobuf.App'
applicationName = 'jackson-json-to-protobuf'
outputDir = new File(project.buildDir, 'tmp')
classpath = jar.outputs.files + project.configurations.runtime
}
applicationDistribution.into('bin') {
from(fieldMask)
from(oneof)
from(nullabilityAndPresense)
from(jsonToProtobuf)
from(jacksonJsonToProtobuf)
fileMode = 0755
}