Skip to content

Commit

Permalink
Specify JDK version. (#341)
Browse files Browse the repository at this point in the history
Reverting Java 11 changes (3d8d0e5).
  • Loading branch information
blackwinter committed Feb 13, 2024
1 parent fa000d3 commit 8567e46
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 5 deletions.
16 changes: 13 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ subprojects {
'equalsverifier': '3.8.2',
'guava': '29.0-jre',
'jackson': '2.13.3',
'jdk': '8',
'jena': '3.17.0',
'jetty': '9.4.14.v20181114',
'jquery': '3.3.1-1',
Expand Down Expand Up @@ -66,9 +67,6 @@ subprojects {

check.dependsOn(javadoc)

sourceCompatibility = '1.8'
targetCompatibility = '1.8'

repositories {
mavenCentral()
maven githubPackage.invoke("metafacture")
Expand All @@ -86,6 +84,18 @@ subprojects {
toolVersion '8.44'
}

java {
toolchain {
languageVersion = JavaLanguageVersion.of(versions.jdk)
}
}

tasks.withType(JavaExec) {
javaLauncher = javaToolchains.launcherFor {
languageVersion = java.toolchain.languageVersion
}
}

tasks.withType(JavaCompile) {
'all -processing -rawtypes -serial'.split().each {
options.compilerArgs << "-Xlint:${it}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2310,7 +2310,7 @@ public void copyFieldToSubfieldOfArrayOfObjectsWithExplicitAppend() {

@Test
public void copyFieldToSubfieldOfArrayOfStringsWithIndexImplicitAppend() {
MetafixTestHelpers.assertProcessException(IndexOutOfBoundsException.class, "Index 0 out of bounds for length 0", () ->
MetafixTestHelpers.assertProcessException(IndexOutOfBoundsException.class, "Index: 0, Size: 0", () ->
MetafixTestHelpers.assertFix(streamReceiver, Arrays.asList(
"set_array('test[]')",
"copy_field('key', 'test[].1')"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
^Exception in thread "main" org\.metafacture\.metafix\.FixProcessException: Error while executing Fix expression \(at .*/metafix/src/test/resources/org/metafacture/metafix/integration/record/fromJson/toJson/copy_fieldToArrayOfStringsWithIndex/test\.fix, line 2\): copy_field\("key", "test\[\]\.1"\)$
^Caused by: java\.lang\.IndexOutOfBoundsException: Index 0 out of bounds for length 0$
^Caused by: java\.lang\.IndexOutOfBoundsException: Index: 0, Size: 0$
4 changes: 4 additions & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
plugins {
id 'org.gradle.toolchains.foojay-resolver-convention' version '0.8.0'
}

include 'metafix'
include 'metafix-ide'
include 'metafix-runner'
Expand Down

0 comments on commit 8567e46

Please sign in to comment.