diff --git a/gradle/plugins/common/src/main/kotlin/junitbuild.java-library-conventions.gradle.kts b/gradle/plugins/common/src/main/kotlin/junitbuild.java-library-conventions.gradle.kts index 94006711ab87..2f0eb40780b8 100644 --- a/gradle/plugins/common/src/main/kotlin/junitbuild.java-library-conventions.gradle.kts +++ b/gradle/plugins/common/src/main/kotlin/junitbuild.java-library-conventions.gradle.kts @@ -238,7 +238,9 @@ tasks.compileJava { // See: https://docs.oracle.com/en/java/javase/12/tools/javac.html options.compilerArgs.addAll(listOf( "-Xlint:all", // Enables all recommended warnings. - "-Werror" // Terminates compilation when warnings occur. + "-Werror", // Terminates compilation when warnings occur. + // Required for compatibility with Java 8's reflection APIs (see https://github.com/junit-team/junit5/issues/3797). + "-parameters", // Generates metadata for reflection on method parameters. )) }