From b0636b02c1a08873cf1e6cfe5bd5cfc8ca4a1ae5 Mon Sep 17 00:00:00 2001 From: Marc Philipp Date: Mon, 29 Apr 2024 07:40:29 +0200 Subject: [PATCH] Enable -parameters Fixes #3797. --- .../kotlin/junitbuild.java-library-conventions.gradle.kts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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. )) }