-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
57 lines (49 loc) · 1.16 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
plugins {
id 'application'
id 'eclipse'
id 'idea'
id "com.github.vontikov.sbe-generator-plugin" version "0.0.9"
}
dependencies {
// SBE codecs dependency
implementation 'org.agrona:agrona:1.21.1'
}
sbeGenerator {
src {
dir = 'src/main/resources/schemas'
// Include parent schema only
includes = ['schema.xml']
}
// Java codecs dir
javaCodecsDir = 'src/generated/java'
// SBE options: see https://github.com/real-logic/simple-binary-encoding/wiki/Sbe-Tool-Guide
javaOptions = [
'sbe.xinclude.aware': 'true',
]
}
sourceSets {
main {
java {
// default Gradle layout
srcDirs = ['src/main/java/']
// generated SBE stubs
srcDir 'src/generated/java'
}
}
}
configurations {
extendedImplementation.extendsFrom implementation
}
task fatJar(type: Jar) {
group 'Build'
description 'Assembles an executable jar.'
manifest {
attributes 'Main-Class': 'uk.co.real_logic.sbe.examples.ExampleUsingGeneratedStub'
}
archiveClassifier = "all"
from {
configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
}
with jar
}
defaultTasks 'clean', 'sbeGenerateJavaCodecs', 'fatJar'