diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 14995b27d..36c7a36ef 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -21,11 +21,8 @@ jobs: fail-fast: false matrix: os-name: [ubuntu-22.04] - java-version: [11, 12, 13, 14, 15, 16, 17, 18, 19, 20] + java-version: [11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21-ea] include: - # Mockito doesn't yet support Java 21, so let's comment it out for now. - # - os-name: ubuntu-22.04 - # java-version: 21-ea # MacOS builds (only check Java 17). - os-name: macos-12 diff --git a/README.md b/README.md index bda015a1e..ee8342f09 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -![Java 11+](https://img.shields.io/badge/Java-11--20-brown?logo=openjdk) +![Java 11+](https://img.shields.io/badge/Java-11--21-brown?logo=openjdk) [![Build Status](https://github.com/ascopes/java-compiler-testing/actions/workflows/build.yml/badge.svg?branch=main)](https://github.com/ascopes/java-compiler-testing/actions/workflows/build.yml) [![Maven Central](https://img.shields.io/maven-central/v/io.github.ascopes.jct/java-compiler-testing)](https://repo1.maven.org/maven2/io/github/ascopes/jct/java-compiler-testing) [![Code Coverage](https://codecov.io/gh/ascopes/java-compiler-testing/branch/main/graph/badge.svg?token=VT74BP2742)](https://codecov.io/gh/ascopes/java-compiler-testing) diff --git a/acceptance-tests/acceptance-tests-lombok/src/test/groovy/io/github/ascopes/jct/acceptancetests/lombok/LombokIntegrationTest.groovy b/acceptance-tests/acceptance-tests-lombok/src/test/groovy/io/github/ascopes/jct/acceptancetests/lombok/LombokIntegrationTest.groovy index 5293d5360..7fafa6d88 100644 --- a/acceptance-tests/acceptance-tests-lombok/src/test/groovy/io/github/ascopes/jct/acceptancetests/lombok/LombokIntegrationTest.groovy +++ b/acceptance-tests/acceptance-tests-lombok/src/test/groovy/io/github/ascopes/jct/acceptancetests/lombok/LombokIntegrationTest.groovy @@ -18,9 +18,12 @@ package io.github.ascopes.jct.acceptancetests.lombok import io.github.ascopes.jct.compilers.JctCompiler import io.github.ascopes.jct.junit.JavacCompilerTest import io.github.ascopes.jct.workspaces.Workspaces +import org.junit.jupiter.api.BeforeEach import org.junit.jupiter.api.DisplayName +import org.junit.jupiter.api.condition.JRE import static io.github.ascopes.jct.assertions.JctAssertions.assertThatCompilation +import static org.assertj.core.api.Assumptions.assumeThat import static org.assertj.core.api.SoftAssertions.assertSoftly /** @@ -32,9 +35,16 @@ import static org.assertj.core.api.SoftAssertions.assertSoftly * @author Ashley Scopes */ @DisplayName("Lombok Integration test") -@SuppressWarnings('GrUnresolvedAccess') +@SuppressWarnings("GrUnresolvedAccess") class LombokIntegrationTest { + @BeforeEach + void setUp() { + assumeThat(JRE.currentVersion()) + .withFailMessage("Lombok fails under JDK-21: See Lombok GH-3393") + .isLessThanOrEqualTo(JRE.JAVA_20) + } + @DisplayName("Lombok @Data compiles the expected data class") @JavacCompilerTest void lombokDataCompilesTheExpectedDataClass(JctCompiler compiler) { diff --git a/pom.xml b/pom.xml index 42fc5e1a0..b217935c4 100644 --- a/pom.xml +++ b/pom.xml @@ -141,8 +141,12 @@ Tired compilation is modified to reduce the amount of time the JVM wastes JITing code during tests. + + Byte Buddy experimental support enables running ByteBuddy (used by Mockito) in JDK + experimental builds. --> + -Dnet.bytebuddy.experimental=true -Dorg.slf4j.simpleLogger.log=INFO -Dorg.slf4j.simpleLogger.log.io.github.ascopes.jct=TRACE -Xshare:off