From 1c1ac72bf0972f8c12a761cacde554ba38871cda Mon Sep 17 00:00:00 2001 From: Manfred Hanke Date: Thu, 28 Dec 2023 23:14:17 +0100 Subject: [PATCH] support executing JUnit5 example tests from IntelliJ IDEA IntelliJ IDEA did not offer to execute the `example-junit5` tests directly from the IDE, but adding the `junit-jupiter-api` dependency changed this inconvenient behavior (currently observed with IntelliJ IDEA 2023.2 and 2023.3.2). I've added the dependency to the `testCompileOnly` configuration to suggest that it is not actually needed. Signed-off-by: Manfred Hanke --- example-junit5/build.gradle | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/example-junit5/build.gradle b/example-junit5/build.gradle index 7b499b0..c4950d5 100644 --- a/example-junit5/build.gradle +++ b/example-junit5/build.gradle @@ -1,5 +1,9 @@ dependencies { testImplementation 'com.tngtech.archunit:archunit-junit5:1.2.1' + + // ArchUnit does not actually need the JUnit Jupiter API, + // but some IDEs support executing tests more conveniently when it is present. + testCompileOnly 'org.junit.jupiter:junit-jupiter-api:5.10.1' } test {