@@ -30,7 +30,6 @@ defaultTasks 'clean', 'build', 'shadowJar', 'install'
30
30
def sbeGroup = ' uk.co.real-logic'
31
31
def sbeVersion = file(' version.txt' ). text. trim()
32
32
def sbeJavaVersion = JavaVersion . VERSION_1_8
33
- def sbeJavaReleaseVersion = ' 8'
34
33
35
34
group = sbeGroup
36
35
version = sbeVersion
@@ -139,25 +138,15 @@ subprojects {
139
138
checkstyle. toolVersion = ' 8.25'
140
139
141
140
compileJava {
142
- if (JavaVersion . current(). ordinal() >= JavaVersion . VERSION_1_9 . ordinal()) {
143
- options. compilerArgs. addAll([' --release' , sbeJavaReleaseVersion])
144
- }
145
- else {
146
- sourceCompatibility = sbeJavaVersion
147
- targetCompatibility = sbeJavaVersion
148
- }
141
+ sourceCompatibility = sbeJavaVersion
142
+ targetCompatibility = sbeJavaVersion
149
143
options. encoding = ' UTF-8'
150
144
options. deprecation = true
151
145
}
152
146
153
147
compileTestJava {
154
- if (JavaVersion . current(). ordinal() >= JavaVersion . VERSION_1_9 . ordinal()) {
155
- options. compilerArgs. addAll([' --release' , sbeJavaReleaseVersion])
156
- }
157
- else {
158
- sourceCompatibility = sbeJavaVersion
159
- targetCompatibility = sbeJavaVersion
160
- }
148
+ sourceCompatibility = sbeJavaVersion
149
+ targetCompatibility = sbeJavaVersion
161
150
options. encoding = ' UTF-8'
162
151
options. deprecation = true
163
152
}
@@ -217,13 +206,8 @@ project(':sbe-tool') {
217
206
218
207
compileGeneratedJava {
219
208
dependsOn ' generateCodecs'
220
- if (JavaVersion . current(). ordinal() >= JavaVersion . VERSION_1_9 . ordinal()) {
221
- options. compilerArgs. addAll([' --release' , sbeJavaReleaseVersion])
222
- }
223
- else {
224
- sourceCompatibility = sbeJavaVersion
225
- targetCompatibility = sbeJavaVersion
226
- }
209
+ sourceCompatibility = sbeJavaVersion
210
+ targetCompatibility = sbeJavaVersion
227
211
options. encoding = ' UTF-8'
228
212
options. deprecation = true
229
213
classpath + = sourceSets. main. runtimeClasspath
@@ -381,13 +365,8 @@ project(':sbe-samples') {
381
365
382
366
compileGeneratedJava {
383
367
dependsOn ' generateCodecs'
384
- if (JavaVersion . current(). ordinal() >= JavaVersion . VERSION_1_9 . ordinal()) {
385
- options. compilerArgs. addAll([' --release' , sbeJavaReleaseVersion])
386
- }
387
- else {
388
- sourceCompatibility = sbeJavaVersion
389
- targetCompatibility = sbeJavaVersion
390
- }
368
+ sourceCompatibility = sbeJavaVersion
369
+ targetCompatibility = sbeJavaVersion
391
370
options. encoding = ' UTF-8'
392
371
options. deprecation = true
393
372
classpath + = project(' :sbe-all' ). sourceSets. main. runtimeClasspath
@@ -482,13 +461,8 @@ project(':sbe-benchmarks') {
482
461
483
462
compileGeneratedJava {
484
463
dependsOn ' generateCodecs'
485
- if (JavaVersion . current(). ordinal() >= JavaVersion . VERSION_1_9 . ordinal()) {
486
- options. compilerArgs. addAll([' --release' , sbeJavaReleaseVersion])
487
- }
488
- else {
489
- sourceCompatibility = sbeJavaVersion
490
- targetCompatibility = sbeJavaVersion
491
- }
464
+ sourceCompatibility = sbeJavaVersion
465
+ targetCompatibility = sbeJavaVersion
492
466
options. encoding = ' UTF-8'
493
467
options. deprecation = true
494
468
classpath + = project(' :sbe-all' ). sourceSets. main. runtimeClasspath
0 commit comments