From 10fe4b5cf83be1277d9e79a007d2784a0ec34b1f Mon Sep 17 00:00:00 2001 From: Adam Semenenko <152864218+adam-enko@users.noreply.github.com> Date: Mon, 15 Jan 2024 16:50:34 +0100 Subject: [PATCH] Restructure Gradle Integration tests to use Java Test Suites - create a test suite for each project under test (helps with Gradle caching, task avoidance) - update CI/CD tasks to run specific test-suite tasks - disable integration test tasks due to dependency on Maven Local publishing (this will be fixed in an upcoming PR) --- .github/workflows/preview-publish-ga.yml | 4 +- .github/workflows/preview-publish-web-s3.yml | 6 +- .github/workflows/tests-smoke.yml | 4 +- .github/workflows/tests-thorough.yml | 4 +- .../main/kotlin/dokkabuild.base.gradle.kts | 1 - .../dokkabuild.setup-maven-cli.gradle.kts | 1 - .../kotlin/dokkabuild/DokkaBuildProperties.kt | 3 + build.gradle.kts | 4 + dokka-integration-tests/gradle/README.md | 4 +- .../gradle/build.gradle.kts | 206 ++++++++++++++++-- .../gradle/AbstractGradleIntegrationTest.kt | 5 +- .../dokka/it/gradle/TestedVersions.kt | 6 +- .../StdLibDocumentationIntegrationTest.kt | 0 .../kotlin/CoroutinesGradleIntegrationTest.kt | 2 +- .../SerializationGradleIntegrationTest.kt | 0 .../kotlin}/Android0GradleIntegrationTest.kt | 0 .../AbstractGradleCachingIntegrationTest.kt | 0 .../kotlin}/BasicCachingIntegrationTest.kt | 0 .../kotlin}/BasicGradleIntegrationTest.kt | 0 .../GradleRelocatedCachingIntegrationTest.kt | 0 .../kotlin}/BasicGroovyIntegrationTest.kt | 0 .../kotlin}/Collector0IntegrationTest.kt | 1 - .../kotlin}/ConfigurationTest.kt | 1 - .../kotlin}/JsIRGradleIntegrationTest.kt | 0 .../kotlin}/MultiModule0IntegrationTest.kt | 0 .../kotlin}/MultiModule1IntegrationTest.kt | 0 .../kotlin}/Versioning0IntegrationTest.kt | 2 +- .../Multiplatform0GradleIntegrationTest.kt | 0 .../SequentialTasksExecutionStressTest.kt | 0 .../kotlin}/WasmGradleIntegrationTest.kt | 0 .../WasmJsWasiGradleIntegrationTest.kt | 0 dokka-integration-tests/settings.gradle.kts | 2 +- .../utilities/build.gradle.kts | 2 + .../dokka/it/AbstractIntegrationTest.kt | 1 + .../jetbrains/dokka/it}/gradleRunnerUtils.kt | 26 ++- .../dokka/it}/systemVariableProviders.kt | 6 +- gradle/libs.versions.toml | 2 + 37 files changed, 239 insertions(+), 54 deletions(-) rename dokka-integration-tests/gradle/src/{integrationTest => main}/kotlin/org/jetbrains/dokka/it/gradle/TestedVersions.kt (91%) rename dokka-integration-tests/gradle/src/{integrationTest/kotlin/org/jetbrains/dokka/it => test/kotlin}/StdLibDocumentationIntegrationTest.kt (100%) rename dokka-integration-tests/gradle/src/{integrationTest/kotlin/org/jetbrains/dokka/it/gradle => testExternalProjectKotlinxCoroutines}/kotlin/CoroutinesGradleIntegrationTest.kt (97%) rename dokka-integration-tests/gradle/src/{integrationTest/kotlin/org/jetbrains/dokka/it/gradle => testExternalProjectKotlinxSerialization}/kotlin/SerializationGradleIntegrationTest.kt (100%) rename dokka-integration-tests/gradle/src/{integrationTest/kotlin/org/jetbrains/dokka/it/gradle => testTemplateProjectAndroid/kotlin}/Android0GradleIntegrationTest.kt (100%) rename dokka-integration-tests/gradle/src/{integrationTest/kotlin/org/jetbrains/dokka/it/gradle => testTemplateProjectBasic/kotlin}/AbstractGradleCachingIntegrationTest.kt (100%) rename dokka-integration-tests/gradle/src/{integrationTest/kotlin/org/jetbrains/dokka/it/gradle => testTemplateProjectBasic/kotlin}/BasicCachingIntegrationTest.kt (100%) rename dokka-integration-tests/gradle/src/{integrationTest/kotlin/org/jetbrains/dokka/it/gradle => testTemplateProjectBasic/kotlin}/BasicGradleIntegrationTest.kt (100%) rename dokka-integration-tests/gradle/src/{integrationTest/kotlin/org/jetbrains/dokka/it/gradle => testTemplateProjectBasic/kotlin}/GradleRelocatedCachingIntegrationTest.kt (100%) rename dokka-integration-tests/gradle/src/{integrationTest/kotlin/org/jetbrains/dokka/it/gradle => testTemplateProjectBasicGroovy/kotlin}/BasicGroovyIntegrationTest.kt (100%) rename dokka-integration-tests/gradle/src/{integrationTest/kotlin/org/jetbrains/dokka/it/gradle => testTemplateProjectCollector/kotlin}/Collector0IntegrationTest.kt (99%) rename dokka-integration-tests/gradle/src/{integrationTest/kotlin/org/jetbrains/dokka/it/gradle => testTemplateProjectConfiguration/kotlin}/ConfigurationTest.kt (98%) rename dokka-integration-tests/gradle/src/{integrationTest/kotlin/org/jetbrains/dokka/it/gradle => testTemplateProjectJsIr/kotlin}/JsIRGradleIntegrationTest.kt (100%) rename dokka-integration-tests/gradle/src/{integrationTest/kotlin/org/jetbrains/dokka/it/gradle => testTemplateProjectMultimodule0/kotlin}/MultiModule0IntegrationTest.kt (100%) rename dokka-integration-tests/gradle/src/{integrationTest/kotlin/org/jetbrains/dokka/it/gradle => testTemplateProjectMultimodule1/kotlin}/MultiModule1IntegrationTest.kt (100%) rename dokka-integration-tests/gradle/src/{integrationTest/kotlin/org/jetbrains/dokka/it/gradle => testTemplateProjectMultimoduleVersioning/kotlin}/Versioning0IntegrationTest.kt (98%) rename dokka-integration-tests/gradle/src/{integrationTest/kotlin/org/jetbrains/dokka/it/gradle => testTemplateProjectMultiplatform/kotlin}/Multiplatform0GradleIntegrationTest.kt (100%) rename dokka-integration-tests/gradle/src/{integrationTest/kotlin/org/jetbrains/dokka/it/gradle => testTemplateProjectTasksExecutionStress/kotlin}/SequentialTasksExecutionStressTest.kt (100%) rename dokka-integration-tests/gradle/src/{integrationTest/kotlin/org/jetbrains/dokka/it/gradle => testTemplateProjectWasmBasic/kotlin}/WasmGradleIntegrationTest.kt (100%) rename dokka-integration-tests/gradle/src/{integrationTest/kotlin/org/jetbrains/dokka/it/gradle => testTemplateProjectWasmJsWasiBasic/kotlin}/WasmJsWasiGradleIntegrationTest.kt (100%) rename {dokka-runners/dokkatoo/modules/dokkatoo-plugin/src/testFixtures/kotlin => dokka-integration-tests/utilities/src/main/kotlin/org/jetbrains/dokka/it}/gradleRunnerUtils.kt (63%) rename {dokka-runners/dokkatoo/modules/dokkatoo-plugin/src/testFixtures/kotlin => dokka-integration-tests/utilities/src/main/kotlin/org/jetbrains/dokka/it}/systemVariableProviders.kt (88%) diff --git a/.github/workflows/preview-publish-ga.yml b/.github/workflows/preview-publish-ga.yml index dc46db1ac7..def0ebc0bf 100644 --- a/.github/workflows/preview-publish-ga.yml +++ b/.github/workflows/preview-publish-ga.yml @@ -27,7 +27,7 @@ jobs: uses: gradle/gradle-build-action@v2 with: gradle-home-cache-cleanup: true - arguments: :dokka-integration-tests:gradle:integrationTest --tests org.jetbrains.dokka.it.gradle.kotlin.CoroutinesGradleIntegrationTest --stacktrace "-Dorg.gradle.jvmargs=-Xmx2g -XX:MaxMetaspaceSize=500m" + arguments: :dokka-integration-tests:gradle:testExternalProjectKotlinxCoroutines --stacktrace "-Dorg.gradle.jvmargs=-Xmx2g -XX:MaxMetaspaceSize=500m" env: DOKKA_TEST_OUTPUT_PATH: /home/runner/work/dokka/coroutines - name: Copy files to GitHub Actions Artifacts @@ -56,7 +56,7 @@ jobs: uses: gradle/gradle-build-action@v2 with: gradle-home-cache-cleanup: true - arguments: :dokka-integration-tests:gradle:integrationTest --tests org.jetbrains.dokka.it.gradle.kotlin.SerializationGradleIntegrationTest --stacktrace "-Dorg.gradle.jvmargs=-Xmx2g -XX:MaxMetaspaceSize=500m" + arguments: :dokka-integration-tests:gradle:testExternalProjectKotlinxSerialization --stacktrace "-Dorg.gradle.jvmargs=-Xmx2g -XX:MaxMetaspaceSize=500m" env: DOKKA_TEST_OUTPUT_PATH: /home/runner/work/dokka/serialization - name: Copy files to GitHub Actions Artifacts diff --git a/.github/workflows/preview-publish-web-s3.yml b/.github/workflows/preview-publish-web-s3.yml index 6ee328dd5b..61e2ae279d 100644 --- a/.github/workflows/preview-publish-web-s3.yml +++ b/.github/workflows/preview-publish-web-s3.yml @@ -24,7 +24,7 @@ jobs: uses: gradle/gradle-build-action@v2 with: gradle-home-cache-cleanup: true - arguments: :dokka-integration-tests:gradle:integrationTest --tests org.jetbrains.dokka.it.gradle.kotlin.CoroutinesGradleIntegrationTest --stacktrace "-Dorg.gradle.jvmargs=-Xmx2g -XX:MaxMetaspaceSize=500m" + arguments: :dokka-integration-tests:gradle:testExternalProjectKotlinxCoroutines --stacktrace "-Dorg.gradle.jvmargs=-Xmx2g -XX:MaxMetaspaceSize=500m" env: DOKKA_TEST_OUTPUT_PATH: /home/runner/work/dokka/coroutines - name: Configure AWS credentials for S3 access @@ -38,7 +38,7 @@ jobs: - name: Print link run: echo https://dokka-snapshots.s3.eu-central-1.amazonaws.com/${{ env.branch-name }}/coroutines/${GITHUB_SHA::7}/index.html - kotilnx-serialization: + kotlinx-serialization: runs-on: ubuntu-latest if: github.repository == 'Kotlin/dokka' steps: @@ -55,7 +55,7 @@ jobs: uses: gradle/gradle-build-action@v2 with: gradle-home-cache-cleanup: true - arguments: :dokka-integration-tests:gradle:integrationTest --tests org.jetbrains.dokka.it.gradle.kotlin.SerializationGradleIntegrationTest --stacktrace "-Dorg.gradle.jvmargs=-Xmx2g -XX:MaxMetaspaceSize=500m" + arguments: :dokka-integration-tests:gradle:testExternalProjectKotlinxSerialization --stacktrace "-Dorg.gradle.jvmargs=-Xmx2g -XX:MaxMetaspaceSize=500m" env: DOKKA_TEST_OUTPUT_PATH: /home/runner/work/dokka/serialization - name: Configure AWS credentials for S3 access diff --git a/.github/workflows/tests-smoke.yml b/.github/workflows/tests-smoke.yml index 1646fa22f1..206df7f947 100644 --- a/.github/workflows/tests-smoke.yml +++ b/.github/workflows/tests-smoke.yml @@ -32,11 +32,11 @@ jobs: # Running tests with the Gradle daemon on windows agents leads to some very strange # JVM crashes for some reason. Most likely a problem of Gradle/GitHub/Windows server run: > - ./gradlew test --stacktrace --no-daemon --no-parallel + ./gradlew check --stacktrace --no-daemon --no-parallel "-Dorg.gradle.jvmargs=-Xmx1g -XX:MaxMetaspaceSize=500m" "-Porg.jetbrains.dokka.javaToolchain.testLauncher=${{ env.JAVA_TEST_VERSION }}" - name: Run tests under Ubuntu if: matrix.os != 'windows-latest' run: > - ./gradlew test --stacktrace + ./gradlew check --stacktrace "-Porg.jetbrains.dokka.javaToolchain.testLauncher=${{ env.JAVA_TEST_VERSION }}" diff --git a/.github/workflows/tests-thorough.yml b/.github/workflows/tests-thorough.yml index 8450fa6b9b..5702342557 100644 --- a/.github/workflows/tests-thorough.yml +++ b/.github/workflows/tests-thorough.yml @@ -30,11 +30,11 @@ jobs: # Running tests with the Gradle daemon on windows agents leads to some very strange # JVM crashes for some reason. Most likely a problem of Gradle/GitHub/Windows server run: > - ./gradlew test --stacktrace --no-daemon --no-parallel + ./gradlew check --stacktrace --no-daemon --no-parallel --continue "-Dorg.gradle.jvmargs=-Xmx1g -XX:MaxMetaspaceSize=500m" "-Porg.jetbrains.dokka.javaToolchain.testLauncher=${{ matrix.javaVersion }}" - name: Run tests under Ubuntu/Macos if: matrix.os != 'windows-latest' run: > - ./gradlew test --stacktrace + ./gradlew check --stacktrace --continue "-Porg.jetbrains.dokka.javaToolchain.testLauncher=${{ matrix.javaVersion }}" diff --git a/build-logic/src/main/kotlin/dokkabuild.base.gradle.kts b/build-logic/src/main/kotlin/dokkabuild.base.gradle.kts index 1de47c1513..65a04df445 100644 --- a/build-logic/src/main/kotlin/dokkabuild.base.gradle.kts +++ b/build-logic/src/main/kotlin/dokkabuild.base.gradle.kts @@ -1,7 +1,6 @@ /* * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. */ - import dokkabuild.DokkaBuildProperties import org.gradle.language.base.plugins.LifecycleBasePlugin.VERIFICATION_GROUP diff --git a/build-logic/src/main/kotlin/dokkabuild.setup-maven-cli.gradle.kts b/build-logic/src/main/kotlin/dokkabuild.setup-maven-cli.gradle.kts index 13d311a15a..ce0ab174ed 100644 --- a/build-logic/src/main/kotlin/dokkabuild.setup-maven-cli.gradle.kts +++ b/build-logic/src/main/kotlin/dokkabuild.setup-maven-cli.gradle.kts @@ -84,7 +84,6 @@ val installMavenBinary by tasks.registering(Sync::class) { val archives = serviceOf() from( mavenBinary.flatMap { conf -> - @Suppress("UnstableApiUsage") val resolvedArtifacts = conf.incoming.artifacts.resolvedArtifacts resolvedArtifacts.map { artifacts -> diff --git a/build-logic/src/main/kotlin/dokkabuild/DokkaBuildProperties.kt b/build-logic/src/main/kotlin/dokkabuild/DokkaBuildProperties.kt index 34a78d8ec0..0e2600f8bd 100644 --- a/build-logic/src/main/kotlin/dokkabuild/DokkaBuildProperties.kt +++ b/build-logic/src/main/kotlin/dokkabuild/DokkaBuildProperties.kt @@ -22,6 +22,9 @@ abstract class DokkaBuildProperties @Inject constructor( private val providers: ProviderFactory, ) { + val isCI: Provider = + providers.environmentVariable("CI").map(String::toBoolean).orElse(false) + /** * The main version of Java that should be used to build Dokka source code. * diff --git a/build.gradle.kts b/build.gradle.kts index 8c4239e3fd..0e4f2c571c 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -6,6 +6,10 @@ plugins { id("dokkabuild.base") } +tasks.check { + dependsOn(gradle.includedBuild("dokka-integration-tests").task(":gradle:check")) +} + val publishedIncludedBuilds = listOf("runner-cli", "runner-gradle-plugin-classic", "runner-maven-plugin") val gradlePluginIncludedBuilds = listOf("runner-gradle-plugin-classic") diff --git a/dokka-integration-tests/gradle/README.md b/dokka-integration-tests/gradle/README.md index e0c511e16d..5d2755f9c3 100644 --- a/dokka-integration-tests/gradle/README.md +++ b/dokka-integration-tests/gradle/README.md @@ -14,7 +14,7 @@ Integration tests have fixed git revision number, with the diff patch applied fr In order to update: -* Checkout the project with the requered revision +* Checkout the project with the required revision - It's some state of the `master` * Manually write the diff (or apply the existing one and tweak) to have the project buildable against locally published Dokka of version `for-integration-tests-SNAPSHOT` * `git diff > $pathToProjectInDokka/project.diff` @@ -26,4 +26,4 @@ In order to update: ### Run integration tests with K2 (symbols) To run integration tests with K2, the property `org.jetbrains.dokka.integration_test.useK2` should be set to `true`. -By default, the task `integrationTest` is run with K1 (descriptors). +By default, the integration tests are run with K1 (descriptors). diff --git a/dokka-integration-tests/gradle/build.gradle.kts b/dokka-integration-tests/gradle/build.gradle.kts index ed3300413e..ee6a8ada9a 100644 --- a/dokka-integration-tests/gradle/build.gradle.kts +++ b/dokka-integration-tests/gradle/build.gradle.kts @@ -1,43 +1,213 @@ -import org.jetbrains.kotlin.gradle.dsl.ExplicitApiMode - /* * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. */ +import org.gradle.api.tasks.testing.logging.TestExceptionFormat.FULL +import org.gradle.api.tasks.testing.logging.TestLogEvent.FAILED +import org.gradle.api.tasks.testing.logging.TestLogEvent.SKIPPED +import org.gradle.language.base.plugins.LifecycleBasePlugin.VERIFICATION_GROUP +import org.jetbrains.kotlin.gradle.dsl.ExplicitApiMode.Disabled plugins { - id("dokkabuild.test-integration") + id("dokkabuild.kotlin-jvm") + `test-suite-base` + `java-test-fixtures` } dependencies { - implementation(projects.utilities) + api(projects.utilities) + + api(libs.jsoup) - implementation(kotlin("test-junit5")) - implementation(libs.junit.jupiterApi) - implementation(libs.junit.jupiterParams) + api(libs.kotlin.test) + api(libs.junit.jupiterApi) + api(libs.junit.jupiterParams) - implementation(gradleTestKit()) + api(gradleTestKit()) +} + +kotlin { + explicitApi = Disabled - implementation(libs.jsoup) + compilerOptions { + allWarningsAsErrors = false + optIn.add("kotlin.io.path.ExperimentalPathApi") + } } kotlin { // this project only contains test utils and isn't published, so it doesn't matter about explicit API - explicitApi = ExplicitApiMode.Disabled + explicitApi = Disabled } val aggregatingProject = gradle.includedBuild("dokka") -tasks.integrationTest { +tasks.integrationTestPreparation { dependsOn(aggregatingProject.task(":publishToMavenLocal")) +} + +tasks.withType().configureEach { + dependsOn(tasks.integrationTestPreparation) environment("DOKKA_VERSION", project.version) - inputs.dir(file("projects")) + maxHeapSize = "2G" + + val useK2 = dokkaBuild.integrationTestUseK2.get() + + useJUnitPlatform { + if (useK2) excludeTags("onlyDescriptors", "onlyDescriptorsMPP") + } + + systemProperty("org.jetbrains.dokka.experimental.tryK2", useK2) + + setForkEvery(1) + dokkaBuild.integrationTestParallelism.orNull?.let { + maxParallelForks = it + } + + environment("isExhaustive", dokkaBuild.integrationTestExhaustive) + + // allow inspecting projects in temporary dirs after a test fails + systemProperty( + "junit.jupiter.tempdir.cleanup.mode.default", + dokkaBuild.isCI.map { isCi -> if (isCi) "ALWAYS" else "ON_SUCCESS" }.get(), + ) + + testLogging { + exceptionFormat = FULL + events(SKIPPED, FAILED) + showExceptions = true + showCauses = true + showStackTraces = true + } + + doNotTrackState("uses artifacts from Maven Local") +} + +val templateProjectsDir = layout.projectDirectory.dir("projects") + +@Suppress("UnstableApiUsage") +testing { + suites { + withType().configureEach { + useJUnitJupiter() + + dependencies { + implementation(project()) + } + + targets.configureEach { + testTask.configure { + doFirst { + logger.lifecycle("running $path with javaLauncher:${javaLauncher.orNull?.metadata?.javaRuntimeVersion}") + } + } + } + } + + /** + * Create a new [JvmTestSuite] for a Gradle project. + * + * @param[projectPath] path to the Gradle project that will be tested by this suite, relative to [templateProjectsDir]. + * The directory will be passed as a system property, `templateProjectDir`. + */ + fun registerTestProjectSuite( + name: String, + projectPath: String, + jvm: JavaLanguageVersion? = null, + configure: JvmTestSuite.() -> Unit = {}, + ) { + val templateProjectDir = templateProjectsDir.dir(projectPath) + + register(name) { + targets.configureEach { + testTask.configure { + // Register the project dir as a specific input, so changes in other projects don't affect the caching of this test + inputs.dir(templateProjectDir) + // Pass the template dir in as a property, it is accessible in tests. + systemProperty("templateProjectDir", templateProjectDir.asFile.invariantSeparatorsPath) + + if (jvm != null) { + javaLauncher = javaToolchains.launcherFor { languageVersion = jvm } + } + } + } + configure() + } + } + + // register a separate test suite for each template project, to help with Gradle caching + registerTestProjectSuite( + "testTemplateProjectAndroid", + "it-android-0", + jvm = JavaLanguageVersion.of(11), // AGP requires JVM 11+ + ) + registerTestProjectSuite("testTemplateProjectBasic", "it-basic") + registerTestProjectSuite("testTemplateProjectBasicGroovy", "it-basic-groovy") + registerTestProjectSuite("testTemplateProjectCollector", "it-collector-0") + registerTestProjectSuite("testTemplateProjectConfiguration", "it-configuration") + registerTestProjectSuite("testTemplateProjectJsIr", "it-js-ir-0") + registerTestProjectSuite("testTemplateProjectMultimodule0", "it-multimodule-0") + registerTestProjectSuite("testTemplateProjectMultimodule1", "it-multimodule-1") + registerTestProjectSuite("testTemplateProjectMultimoduleVersioning", "it-multimodule-versioning-0") + registerTestProjectSuite("testTemplateProjectMultiplatform", "it-multiplatform-0") + registerTestProjectSuite("testTemplateProjectTasksExecutionStress", "it-sequential-tasks-execution-stress") + registerTestProjectSuite("testTemplateProjectWasmBasic", "it-wasm-basic") + registerTestProjectSuite("testTemplateProjectWasmJsWasiBasic", "it-wasm-js-wasi-basic") + + registerTestProjectSuite( + "testExternalProjectKotlinxCoroutines", + "coroutines/kotlinx-coroutines", + jvm = JavaLanguageVersion.of(11) // kotlinx.coroutines requires JVM 11+ https://github.com/Kotlin/kotlinx.coroutines/issues/3665 + ) { + targets.configureEach { + testTask.configure { + // register the whole directory as an input because it contains the git diff + inputs.dir(templateProjectsDir.file("coroutines")) + } + } + } + registerTestProjectSuite("testExternalProjectKotlinxSerialization", "serialization/kotlinx-serialization") { + targets.configureEach { + testTask.configure { + // register the whole directory as an input because it contains the git diff + inputs.dir(templateProjectsDir.file("serialization")) + } + } + } + } + tasks.check { + dependsOn(suites) + } +} + +//region project tests management + +// set up task ordering - template projects (which are generally faster) should be tested before external projects +val testTemplateProjectsTasks = tasks.withType().matching { it.name.startsWith("testTemplateProject") } +val testExternalProjectsTasks = tasks.withType().matching { it.name.startsWith("testExternalProject") } + +testTemplateProjectsTasks.configureEach { + shouldRunAfter(tasks.test) +} +testExternalProjectsTasks.configureEach { + shouldRunAfter(tasks.test) + shouldRunAfter(testTemplateProjectsTasks) +} + +// define lifecycle tasks for project tests +val testAllTemplateProjects by tasks.registering { + description = "Lifecycle task for running all template-project tests" + group = VERIFICATION_GROUP + dependsOn(testTemplateProjectsTasks) + doNotTrackState("lifecycle task, should always run") +} - javaLauncher.set(javaToolchains.launcherFor { - // kotlinx.coroutines requires Java 11+ - languageVersion.set(dokkaBuild.testJavaLauncherVersion.map { - maxOf(it, JavaLanguageVersion.of(11)) - }) - }) +val testAllExternalProjects by tasks.registering { + description = "Lifecycle task for running all external-project tests" + group = VERIFICATION_GROUP + shouldRunAfter(testAllTemplateProjects) + dependsOn(testExternalProjectsTasks) + doNotTrackState("lifecycle task, should always run") } +//endregion diff --git a/dokka-integration-tests/gradle/src/main/kotlin/org/jetbrains/dokka/it/gradle/AbstractGradleIntegrationTest.kt b/dokka-integration-tests/gradle/src/main/kotlin/org/jetbrains/dokka/it/gradle/AbstractGradleIntegrationTest.kt index 3a047ebbd7..8c162e94e3 100644 --- a/dokka-integration-tests/gradle/src/main/kotlin/org/jetbrains/dokka/it/gradle/AbstractGradleIntegrationTest.kt +++ b/dokka-integration-tests/gradle/src/main/kotlin/org/jetbrains/dokka/it/gradle/AbstractGradleIntegrationTest.kt @@ -6,10 +6,10 @@ package org.jetbrains.dokka.it.gradle import org.gradle.testkit.runner.BuildResult import org.gradle.testkit.runner.GradleRunner -import org.gradle.testkit.runner.internal.DefaultGradleRunner import org.gradle.tooling.GradleConnectionException import org.gradle.util.GradleVersion import org.jetbrains.dokka.it.AbstractIntegrationTest +import org.jetbrains.dokka.it.withJvmArguments import java.io.File import java.net.URI import kotlin.test.BeforeTest @@ -50,8 +50,7 @@ abstract class AbstractGradleIntegrationTest : AbstractIntegrationTest() { * arguments ) - ).run { this as DefaultGradleRunner } - .withJvmArguments(jvmArgs) + ).withJvmArguments(jvmArgs) } fun GradleRunner.buildRelaxed(): BuildResult { diff --git a/dokka-integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/TestedVersions.kt b/dokka-integration-tests/gradle/src/main/kotlin/org/jetbrains/dokka/it/gradle/TestedVersions.kt similarity index 91% rename from dokka-integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/TestedVersions.kt rename to dokka-integration-tests/gradle/src/main/kotlin/org/jetbrains/dokka/it/gradle/TestedVersions.kt index 521af96925..121523455e 100644 --- a/dokka-integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/TestedVersions.kt +++ b/dokka-integration-tests/gradle/src/main/kotlin/org/jetbrains/dokka/it/gradle/TestedVersions.kt @@ -9,10 +9,10 @@ import org.junit.jupiter.params.provider.Arguments import org.junit.jupiter.params.provider.ArgumentsProvider import java.util.stream.Stream -internal class LatestTestedVersionsArgumentsProvider : TestedVersionsArgumentsProvider(listOf(TestedVersions.LATEST)) -internal open class AllSupportedTestedVersionsArgumentsProvider : TestedVersionsArgumentsProvider(TestedVersions.ALL_SUPPORTED) +class LatestTestedVersionsArgumentsProvider : TestedVersionsArgumentsProvider(listOf(TestedVersions.LATEST)) +open class AllSupportedTestedVersionsArgumentsProvider : TestedVersionsArgumentsProvider(TestedVersions.ALL_SUPPORTED) -internal object TestedVersions { +object TestedVersions { val LATEST = BuildVersions("7.6.2", "1.9.22") diff --git a/dokka-integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/StdLibDocumentationIntegrationTest.kt b/dokka-integration-tests/gradle/src/test/kotlin/StdLibDocumentationIntegrationTest.kt similarity index 100% rename from dokka-integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/StdLibDocumentationIntegrationTest.kt rename to dokka-integration-tests/gradle/src/test/kotlin/StdLibDocumentationIntegrationTest.kt diff --git a/dokka-integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/kotlin/CoroutinesGradleIntegrationTest.kt b/dokka-integration-tests/gradle/src/testExternalProjectKotlinxCoroutines/kotlin/CoroutinesGradleIntegrationTest.kt similarity index 97% rename from dokka-integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/kotlin/CoroutinesGradleIntegrationTest.kt rename to dokka-integration-tests/gradle/src/testExternalProjectKotlinxCoroutines/kotlin/CoroutinesGradleIntegrationTest.kt index dd8b527e9a..ed85682f68 100644 --- a/dokka-integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/kotlin/CoroutinesGradleIntegrationTest.kt +++ b/dokka-integration-tests/gradle/src/testExternalProjectKotlinxCoroutines/kotlin/CoroutinesGradleIntegrationTest.kt @@ -53,7 +53,7 @@ class CoroutinesGradleIntegrationTest : AbstractGradleIntegrationTest(), TestOut val result = createGradleRunner( buildVersions, ":dokkaHtmlMultiModule", "-i", "-s", - jvmArgs = listOf("-Xmx2G", "-XX:MaxMetaspaceSize=500m") + jvmArgs = listOf("-Xmx2G", "-XX:MaxMetaspaceSize=2g") ).buildRelaxed() assertEquals(TaskOutcome.SUCCESS, assertNotNull(result.task(":dokkaHtmlMultiModule")).outcome) diff --git a/dokka-integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/kotlin/SerializationGradleIntegrationTest.kt b/dokka-integration-tests/gradle/src/testExternalProjectKotlinxSerialization/kotlin/SerializationGradleIntegrationTest.kt similarity index 100% rename from dokka-integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/kotlin/SerializationGradleIntegrationTest.kt rename to dokka-integration-tests/gradle/src/testExternalProjectKotlinxSerialization/kotlin/SerializationGradleIntegrationTest.kt diff --git a/dokka-integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/Android0GradleIntegrationTest.kt b/dokka-integration-tests/gradle/src/testTemplateProjectAndroid/kotlin/Android0GradleIntegrationTest.kt similarity index 100% rename from dokka-integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/Android0GradleIntegrationTest.kt rename to dokka-integration-tests/gradle/src/testTemplateProjectAndroid/kotlin/Android0GradleIntegrationTest.kt diff --git a/dokka-integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/AbstractGradleCachingIntegrationTest.kt b/dokka-integration-tests/gradle/src/testTemplateProjectBasic/kotlin/AbstractGradleCachingIntegrationTest.kt similarity index 100% rename from dokka-integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/AbstractGradleCachingIntegrationTest.kt rename to dokka-integration-tests/gradle/src/testTemplateProjectBasic/kotlin/AbstractGradleCachingIntegrationTest.kt diff --git a/dokka-integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/BasicCachingIntegrationTest.kt b/dokka-integration-tests/gradle/src/testTemplateProjectBasic/kotlin/BasicCachingIntegrationTest.kt similarity index 100% rename from dokka-integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/BasicCachingIntegrationTest.kt rename to dokka-integration-tests/gradle/src/testTemplateProjectBasic/kotlin/BasicCachingIntegrationTest.kt diff --git a/dokka-integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/BasicGradleIntegrationTest.kt b/dokka-integration-tests/gradle/src/testTemplateProjectBasic/kotlin/BasicGradleIntegrationTest.kt similarity index 100% rename from dokka-integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/BasicGradleIntegrationTest.kt rename to dokka-integration-tests/gradle/src/testTemplateProjectBasic/kotlin/BasicGradleIntegrationTest.kt diff --git a/dokka-integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/GradleRelocatedCachingIntegrationTest.kt b/dokka-integration-tests/gradle/src/testTemplateProjectBasic/kotlin/GradleRelocatedCachingIntegrationTest.kt similarity index 100% rename from dokka-integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/GradleRelocatedCachingIntegrationTest.kt rename to dokka-integration-tests/gradle/src/testTemplateProjectBasic/kotlin/GradleRelocatedCachingIntegrationTest.kt diff --git a/dokka-integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/BasicGroovyIntegrationTest.kt b/dokka-integration-tests/gradle/src/testTemplateProjectBasicGroovy/kotlin/BasicGroovyIntegrationTest.kt similarity index 100% rename from dokka-integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/BasicGroovyIntegrationTest.kt rename to dokka-integration-tests/gradle/src/testTemplateProjectBasicGroovy/kotlin/BasicGroovyIntegrationTest.kt diff --git a/dokka-integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/Collector0IntegrationTest.kt b/dokka-integration-tests/gradle/src/testTemplateProjectCollector/kotlin/Collector0IntegrationTest.kt similarity index 99% rename from dokka-integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/Collector0IntegrationTest.kt rename to dokka-integration-tests/gradle/src/testTemplateProjectCollector/kotlin/Collector0IntegrationTest.kt index f31cf2bb0f..9e3d47978a 100644 --- a/dokka-integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/Collector0IntegrationTest.kt +++ b/dokka-integration-tests/gradle/src/testTemplateProjectCollector/kotlin/Collector0IntegrationTest.kt @@ -80,4 +80,3 @@ class Collector0IntegrationTest : AbstractGradleIntegrationTest() { assertTrue(isDirectory, "Missing dokka gfmCollector output directory") } } - diff --git a/dokka-integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/ConfigurationTest.kt b/dokka-integration-tests/gradle/src/testTemplateProjectConfiguration/kotlin/ConfigurationTest.kt similarity index 98% rename from dokka-integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/ConfigurationTest.kt rename to dokka-integration-tests/gradle/src/testTemplateProjectConfiguration/kotlin/ConfigurationTest.kt index 990315426f..ae623b84d5 100644 --- a/dokka-integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/ConfigurationTest.kt +++ b/dokka-integration-tests/gradle/src/testTemplateProjectConfiguration/kotlin/ConfigurationTest.kt @@ -43,7 +43,6 @@ class ConfigurationTest : AbstractGradleIntegrationTest() { */ @ParameterizedTest(name = "{0}") @ArgumentsSource(LatestTestedVersionsArgumentsProvider::class) - @Suppress("FunctionName") fun `should fail with DokkaException and readable message if failOnWarning is triggered`( buildVersions: BuildVersions ) { diff --git a/dokka-integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/JsIRGradleIntegrationTest.kt b/dokka-integration-tests/gradle/src/testTemplateProjectJsIr/kotlin/JsIRGradleIntegrationTest.kt similarity index 100% rename from dokka-integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/JsIRGradleIntegrationTest.kt rename to dokka-integration-tests/gradle/src/testTemplateProjectJsIr/kotlin/JsIRGradleIntegrationTest.kt diff --git a/dokka-integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/MultiModule0IntegrationTest.kt b/dokka-integration-tests/gradle/src/testTemplateProjectMultimodule0/kotlin/MultiModule0IntegrationTest.kt similarity index 100% rename from dokka-integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/MultiModule0IntegrationTest.kt rename to dokka-integration-tests/gradle/src/testTemplateProjectMultimodule0/kotlin/MultiModule0IntegrationTest.kt diff --git a/dokka-integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/MultiModule1IntegrationTest.kt b/dokka-integration-tests/gradle/src/testTemplateProjectMultimodule1/kotlin/MultiModule1IntegrationTest.kt similarity index 100% rename from dokka-integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/MultiModule1IntegrationTest.kt rename to dokka-integration-tests/gradle/src/testTemplateProjectMultimodule1/kotlin/MultiModule1IntegrationTest.kt diff --git a/dokka-integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/Versioning0IntegrationTest.kt b/dokka-integration-tests/gradle/src/testTemplateProjectMultimoduleVersioning/kotlin/Versioning0IntegrationTest.kt similarity index 98% rename from dokka-integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/Versioning0IntegrationTest.kt rename to dokka-integration-tests/gradle/src/testTemplateProjectMultimoduleVersioning/kotlin/Versioning0IntegrationTest.kt index 381a10e03b..4e05c0f372 100644 --- a/dokka-integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/Versioning0IntegrationTest.kt +++ b/dokka-integration-tests/gradle/src/testTemplateProjectMultimoduleVersioning/kotlin/Versioning0IntegrationTest.kt @@ -26,7 +26,7 @@ class Versioning0IntegrationTest : AbstractGradleIntegrationTest() { /** * This test runs versioning 3 times to simulate how users might use it in the real word * - * Each version has a separate task that has a different version number from 1.0 to 1.2 and is placed under `builDir/dokkas/` + * Each version has a separate task that has a different version number from 1.0 to 1.2 and is placed under `buildDir/dokkas/` * * Output is produced in a standard build directory under `build/dokka/htmlMultiModule` */ diff --git a/dokka-integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/Multiplatform0GradleIntegrationTest.kt b/dokka-integration-tests/gradle/src/testTemplateProjectMultiplatform/kotlin/Multiplatform0GradleIntegrationTest.kt similarity index 100% rename from dokka-integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/Multiplatform0GradleIntegrationTest.kt rename to dokka-integration-tests/gradle/src/testTemplateProjectMultiplatform/kotlin/Multiplatform0GradleIntegrationTest.kt diff --git a/dokka-integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/SequentialTasksExecutionStressTest.kt b/dokka-integration-tests/gradle/src/testTemplateProjectTasksExecutionStress/kotlin/SequentialTasksExecutionStressTest.kt similarity index 100% rename from dokka-integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/SequentialTasksExecutionStressTest.kt rename to dokka-integration-tests/gradle/src/testTemplateProjectTasksExecutionStress/kotlin/SequentialTasksExecutionStressTest.kt diff --git a/dokka-integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/WasmGradleIntegrationTest.kt b/dokka-integration-tests/gradle/src/testTemplateProjectWasmBasic/kotlin/WasmGradleIntegrationTest.kt similarity index 100% rename from dokka-integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/WasmGradleIntegrationTest.kt rename to dokka-integration-tests/gradle/src/testTemplateProjectWasmBasic/kotlin/WasmGradleIntegrationTest.kt diff --git a/dokka-integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/WasmJsWasiGradleIntegrationTest.kt b/dokka-integration-tests/gradle/src/testTemplateProjectWasmJsWasiBasic/kotlin/WasmJsWasiGradleIntegrationTest.kt similarity index 100% rename from dokka-integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/WasmJsWasiGradleIntegrationTest.kt rename to dokka-integration-tests/gradle/src/testTemplateProjectWasmJsWasiBasic/kotlin/WasmJsWasiGradleIntegrationTest.kt diff --git a/dokka-integration-tests/settings.gradle.kts b/dokka-integration-tests/settings.gradle.kts index c8fb69bbef..6361820996 100644 --- a/dokka-integration-tests/settings.gradle.kts +++ b/dokka-integration-tests/settings.gradle.kts @@ -10,8 +10,8 @@ pluginManagement { includeBuild("../build-logic") repositories { - gradlePluginPortal() mavenCentral() + gradlePluginPortal() } } diff --git a/dokka-integration-tests/utilities/build.gradle.kts b/dokka-integration-tests/utilities/build.gradle.kts index 5430e9c155..b3dd611e3b 100644 --- a/dokka-integration-tests/utilities/build.gradle.kts +++ b/dokka-integration-tests/utilities/build.gradle.kts @@ -16,6 +16,8 @@ dependencies { implementation(libs.kotlinx.coroutines.core) implementation(libs.jsoup) implementation(libs.eclipse.jgit) + + implementation(gradleTestKit()) } kotlin { diff --git a/dokka-integration-tests/utilities/src/main/kotlin/org/jetbrains/dokka/it/AbstractIntegrationTest.kt b/dokka-integration-tests/utilities/src/main/kotlin/org/jetbrains/dokka/it/AbstractIntegrationTest.kt index b6f3462f0f..8be1e2f5ea 100644 --- a/dokka-integration-tests/utilities/src/main/kotlin/org/jetbrains/dokka/it/AbstractIntegrationTest.kt +++ b/dokka-integration-tests/utilities/src/main/kotlin/org/jetbrains/dokka/it/AbstractIntegrationTest.kt @@ -18,6 +18,7 @@ abstract class AbstractIntegrationTest { @field:TempDir lateinit var tempFolder: File + /** Working directory of the test. Contains the project that should be tested. */ val projectDir: File get() = File(tempFolder, "project") fun File.allDescendentsWithExtension(extension: String): Sequence = diff --git a/dokka-runners/dokkatoo/modules/dokkatoo-plugin/src/testFixtures/kotlin/gradleRunnerUtils.kt b/dokka-integration-tests/utilities/src/main/kotlin/org/jetbrains/dokka/it/gradleRunnerUtils.kt similarity index 63% rename from dokka-runners/dokkatoo/modules/dokkatoo-plugin/src/testFixtures/kotlin/gradleRunnerUtils.kt rename to dokka-integration-tests/utilities/src/main/kotlin/org/jetbrains/dokka/it/gradleRunnerUtils.kt index 912d1df17b..351fcfaf65 100644 --- a/dokka-runners/dokkatoo/modules/dokkatoo-plugin/src/testFixtures/kotlin/gradleRunnerUtils.kt +++ b/dokka-integration-tests/utilities/src/main/kotlin/org/jetbrains/dokka/it/gradleRunnerUtils.kt @@ -1,4 +1,7 @@ -package org.jetbrains.dokka.dokkatoo.utils +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ +package org.jetbrains.dokka.it import org.gradle.testkit.runner.BuildResult import org.gradle.testkit.runner.BuildTask @@ -9,25 +12,26 @@ import org.gradle.testkit.runner.internal.DefaultGradleRunner /** Edit environment variables in the Gradle Runner */ @Deprecated("Windows does not support withEnvironment - https://github.com/gradle/gradle/issues/23959") fun GradleRunner.withEnvironment(build: MutableMap.() -> Unit): GradleRunner { - val env = environment ?: mutableMapOf() - env.build() - return withEnvironment(env) + val env = environment ?: mutableMapOf() + env.build() + return withEnvironment(env) } inline fun GradleRunner.build( - handleResult: BuildResult.() -> Unit + handleResult: BuildResult.() -> Unit ): Unit = build().let(handleResult) inline fun GradleRunner.buildAndFail( - handleResult: BuildResult.() -> Unit + handleResult: BuildResult.() -> Unit ): Unit = buildAndFail().let(handleResult) +// workaround for https://github.com/gradle/gradle/issues/1043 fun GradleRunner.withJvmArguments( - vararg jvmArguments: String -): GradleRunner = (this as DefaultGradleRunner).withJvmArguments(*jvmArguments) + jvmArguments: Collection +): GradleRunner = (this as DefaultGradleRunner).withJvmArguments(*jvmArguments.toTypedArray()) /** @@ -35,13 +39,13 @@ fun GradleRunner.withJvmArguments( * [GradleRunner arguments][GradleRunner.getArguments]. */ fun GradleRunner.addArguments( - vararg arguments: String + vararg arguments: String ): GradleRunner = - withArguments(this@addArguments.arguments + arguments) + withArguments(this@addArguments.arguments + arguments) /** * Get the name of the task, without the leading [BuildTask.getPath]. */ val BuildTask.name: String - get() = path.substringAfterLast(':') + get() = path.substringAfterLast(':') diff --git a/dokka-runners/dokkatoo/modules/dokkatoo-plugin/src/testFixtures/kotlin/systemVariableProviders.kt b/dokka-integration-tests/utilities/src/main/kotlin/org/jetbrains/dokka/it/systemVariableProviders.kt similarity index 88% rename from dokka-runners/dokkatoo/modules/dokkatoo-plugin/src/testFixtures/kotlin/systemVariableProviders.kt rename to dokka-integration-tests/utilities/src/main/kotlin/org/jetbrains/dokka/it/systemVariableProviders.kt index b15b3edbb6..6eabc78d04 100644 --- a/dokka-runners/dokkatoo/modules/dokkatoo-plugin/src/testFixtures/kotlin/systemVariableProviders.kt +++ b/dokka-integration-tests/utilities/src/main/kotlin/org/jetbrains/dokka/it/systemVariableProviders.kt @@ -1,4 +1,8 @@ -package org.jetbrains.dokka.dokkatoo.utils +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + +package org.jetbrains.dokka.it import kotlin.properties.ReadOnlyProperty diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index b0e9ef59dd..0ef416ea80 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -137,6 +137,8 @@ kotlinx-cli = { module = "org.jetbrains.kotlinx:kotlinx-cli-jvm", version.ref = #### Test dependencies #### eclipse-jgit = { module = "org.eclipse.jgit:org.eclipse.jgit", version.ref = "eclipse-jgit" } +kotlin-test = { module = "org.jetbrains.kotlin:kotlin-test-junit5", version.ref = "gradlePlugin-kotlin" } + junit-bom = { module = "org.junit:junit-bom", version.ref = "junit" } junit-jupiterApi = { module = "org.junit.jupiter:junit-jupiter-api", version.ref = "junit" } junit-jupiterParams = { module = "org.junit.jupiter:junit-jupiter-params", version.ref = "junit" }