|
import org.gradle.api.tasks.PathSensitivity.NONE |
|
import org.gradle.api.tasks.PathSensitivity.RELATIVE |
|
import org.gradle.internal.os.OperatingSystem |
|
|
|
plugins { |
|
id("junitbuild.java-library-conventions") |
|
id("junitbuild.junit4-compatibility") |
|
id("junitbuild.testing-conventions") |
|
alias(libs.plugins.jmh) |
|
} |
|
|
|
dependencies { |
|
|
|
testImplementation(projects.junitPlatformCommons) |
|
testImplementation(projects.junitPlatformConsole) |
|
testImplementation(projects.junitPlatformEngine) |
|
testImplementation(projects.junitPlatformJfr) |
|
testImplementation(projects.junitPlatformLauncher) |
|
testImplementation(projects.junitPlatformSuiteCommons) |
|
testImplementation(projects.junitPlatformSuiteEngine) |
|
|
|
|
|
testImplementation(projects.junitPlatformRunner) |
|
testImplementation(projects.junitPlatformTestkit) |
|
testImplementation(testFixtures(projects.junitPlatformCommons)) |
|
testImplementation(testFixtures(projects.junitPlatformEngine)) |
|
testImplementation(testFixtures(projects.junitPlatformLauncher)) |
|
testImplementation(projects.junitJupiterEngine) |
|
testImplementation(libs.apiguardian) |
|
testImplementation(libs.jfrunit) { |
|
exclude(group = "org.junit.vintage") |
|
} |
|
testImplementation(libs.joox) |
|
testImplementation(libs.openTestReporting.tooling) |
|
testImplementation(libs.picocli) |
|
testImplementation(libs.bundles.xmlunit) |
|
testImplementation(testFixtures(projects.junitJupiterApi)) |
|
|
|
|
|
testRuntimeOnly(projects.junitVintageEngine) |
|
testRuntimeOnly(libs.groovy4) { |
|
because("`ReflectionUtilsTests.findNestedClassesWithInvalidNestedClassFile` needs it") |
|
} |
|
|
|
|
|
jmh(libs.jmh.core) |
|
jmh(projects.junitJupiterApi) |
|
jmh(libs.junit4) |
|
jmhAnnotationProcessor(libs.jmh.generator.annprocess) |
|
} |
|
|
|
jmh { |
|
jmhVersion = libs.versions.jmh |
|
|
|
duplicateClassesStrategy = DuplicatesStrategy.WARN |
|
fork = 1 |
|
warmupIterations = 1 |
|
iterations = 5 |
|
} |
|
|
|
tasks { |
|
withType<Test>().configureEach { |
|
useJUnitPlatform { |
|
excludeTags("exclude") |
|
} |
|
jvmArgs("-Xmx1g") |
|
distribution { |
|
|
|
|
|
retryInSameJvm = !OperatingSystem.current().isWindows |
|
} |
|
} |
|
test { |
|
|
|
inputs.dir("src/test/resources").withPathSensitivity(RELATIVE) |
|
inputs.file(buildFile).withPathSensitivity(NONE) |
|
} |
|
test_4_12 { |
|
useJUnitPlatform { |
|
includeTags("junit4") |
|
} |
|
} |
|
checkstyleJmh { |
|
config = resources.text.fromFile(checkstyle.configDirectory.file("checkstyleTest.xml")) |
|
} |
|
} |
|
|
|
eclipse { |
|
classpath { |
|
plusConfigurations.add(projects.junitPlatformConsole.dependencyProject.configurations["shadowed"]) |
|
} |
|
} |
|
|
|
idea { |
|
module { |
|
scopes["PROVIDED"]!!["plus"]!!.add(projects.junitPlatformConsole.dependencyProject.configurations["shadowed"]) |
|
} |
|
} |
|
|