Skip to content

Commit fa5b60b

Browse files
committed
[Java] Add sbeJavaVersion variable.
1 parent b88d968 commit fa5b60b

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

build.gradle

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ defaultTasks 'clean', 'build', 'shadowJar', 'install'
2828

2929
def sbeGroup = 'uk.co.real-logic'
3030
def sbeVersion = file('version.txt').text.trim()
31+
def sbeJavaVersion = '1.8'
3132

3233
group = sbeGroup
3334
version = sbeVersion
@@ -135,15 +136,15 @@ subprojects {
135136
}
136137

137138
compileJava {
138-
sourceCompatibility = '1.8'
139-
targetCompatibility = '1.8'
139+
sourceCompatibility = sbeJavaVersion
140+
targetCompatibility = sbeJavaVersion
140141
options.encoding = 'UTF-8'
141142
options.deprecation = true
142143
}
143144

144145
compileTestJava {
145-
sourceCompatibility = '1.8'
146-
targetCompatibility = '1.8'
146+
sourceCompatibility = sbeJavaVersion
147+
targetCompatibility = sbeJavaVersion
147148
options.encoding = 'UTF-8'
148149
options.deprecation = true
149150
}
@@ -198,8 +199,8 @@ project(':sbe-tool') {
198199

199200
compileGeneratedJava {
200201
dependsOn 'generateCodecs'
201-
sourceCompatibility = '1.8'
202-
targetCompatibility = '1.8'
202+
sourceCompatibility = sbeJavaVersion
203+
targetCompatibility = sbeJavaVersion
203204
options.encoding = 'UTF-8'
204205
options.deprecation = true
205206
classpath += sourceSets.main.runtimeClasspath
@@ -352,8 +353,8 @@ project(':sbe-samples') {
352353

353354
compileGeneratedJava {
354355
dependsOn 'generateCodecs'
355-
sourceCompatibility = '1.8'
356-
targetCompatibility = '1.8'
356+
sourceCompatibility = sbeJavaVersion
357+
targetCompatibility = sbeJavaVersion
357358
options.encoding = 'UTF-8'
358359
options.deprecation = true
359360
classpath += project(':sbe-all').sourceSets.main.runtimeClasspath
@@ -531,7 +532,7 @@ task generateCarExampleDataFile(type: JavaExec) {
531532
main = 'uk.co.real_logic.sbe.examples.ExampleUsingGeneratedStub'
532533
classpath = project(':sbe-samples').sourceSets.main.runtimeClasspath
533534
systemProperties(
534-
'sbe.encoding.filename': 'rust/car_example/car_example_data.sbe')
535+
'sbe.encoding.filename': 'rust/car_example/car_example_data.sbe')
535536
args = []
536537
standardOutput = new ByteArrayOutputStream()
537538
}

0 commit comments

Comments
 (0)