-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
59 lines (48 loc) · 1.33 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
plugins {
id 'java'
}
def sbeVersion = '1.12.4'
group 'hannes'
version '1.0-SNAPSHOT'
sourceCompatibility = 1.8
repositories {
mavenCentral()
}
configurations{
codecGeneration
}
dependencies {
compile group: 'com.lmax', name: 'disruptor', version: '3.4.2'
compile group: 'uk.co.real-logic', name: 'sbe-all', version: '1.12.4'
compile files('build/classes/java/generated')
testImplementation('org.junit.jupiter:junit-jupiter:5.4.2')
codecGeneration "uk.co.real-logic:sbe-tool:${sbeVersion}"
}
test {
useJUnitPlatform()
testLogging {
events "passed", "skipped", "failed"
}
}
def generatedDir = file("${buildDir}/generated-src")
sourceSets {
generated.java.srcDir generatedDir
}
compileJava.dependsOn 'compileGeneratedJava'
compileGeneratedJava {
dependsOn 'generateCodecs'
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
options.encoding = 'UTF-8'
options.deprecation = true
classpath += configurations.codecGeneration
}
task generateCodecs(type: JavaExec) {
main = 'uk.co.real_logic.sbe.SbeTool'
classpath = configurations.codecGeneration
systemProperties(
'sbe.output.dir': generatedDir,
'sbe.target.language': 'Java',
'sbe.validation.stop.on.error': 'true')
args = ['src/main/resources/utbildningsinstans.xml']
}