Skip to content

Commit e78eedf

Browse files
committed
[Java] Revert.
1 parent 8f585e9 commit e78eedf

File tree

1 file changed

+10
-36
lines changed

1 file changed

+10
-36
lines changed

build.gradle

Lines changed: 10 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ defaultTasks 'clean', 'build', 'shadowJar', 'install'
3030
def sbeGroup = 'uk.co.real-logic'
3131
def sbeVersion = file('version.txt').text.trim()
3232
def sbeJavaVersion = JavaVersion.VERSION_1_8
33-
def sbeJavaReleaseVersion = '8'
3433

3534
group = sbeGroup
3635
version = sbeVersion
@@ -139,25 +138,15 @@ subprojects {
139138
checkstyle.toolVersion = '8.25'
140139

141140
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
149143
options.encoding = 'UTF-8'
150144
options.deprecation = true
151145
}
152146

153147
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
161150
options.encoding = 'UTF-8'
162151
options.deprecation = true
163152
}
@@ -217,13 +206,8 @@ project(':sbe-tool') {
217206

218207
compileGeneratedJava {
219208
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
227211
options.encoding = 'UTF-8'
228212
options.deprecation = true
229213
classpath += sourceSets.main.runtimeClasspath
@@ -381,13 +365,8 @@ project(':sbe-samples') {
381365

382366
compileGeneratedJava {
383367
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
391370
options.encoding = 'UTF-8'
392371
options.deprecation = true
393372
classpath += project(':sbe-all').sourceSets.main.runtimeClasspath
@@ -482,13 +461,8 @@ project(':sbe-benchmarks') {
482461

483462
compileGeneratedJava {
484463
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
492466
options.encoding = 'UTF-8'
493467
options.deprecation = true
494468
classpath += project(':sbe-all').sourceSets.main.runtimeClasspath

0 commit comments

Comments
 (0)