diff options
author | Ignat Beresnev <ignat.beresnev@jetbrains.com> | 2022-04-14 16:08:11 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-14 16:08:11 +0300 |
commit | 334c9e14dff14f0eb08bda10bac9e622aa132afc (patch) | |
tree | 5ba5ac8938f1be540ee8324bed6759913ec96e03 /integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka | |
parent | 21a50e214f3d834bd51525807929e1adb9d0fe6c (diff) | |
download | dokka-334c9e14dff14f0eb08bda10bac9e622aa132afc.tar.gz dokka-334c9e14dff14f0eb08bda10bac9e622aa132afc.tar.bz2 dokka-334c9e14dff14f0eb08bda10bac9e622aa132afc.zip |
Use common gradle+kotlin versions across gradle integration tests (#2287)
* Use common gradle+kotlin versions across gradle integration tests
* Separate JVM/Android/MPP tested versions
* Fix react integration tests for 1.6.10
* Move kotlin react wrapper mapping to TestedVersions
* Update gradle to 6.9.2
Diffstat (limited to 'integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka')
12 files changed, 59 insertions, 71 deletions
diff --git a/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/Android0GradleIntegrationTest.kt b/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/Android0GradleIntegrationTest.kt index 4352175f..8874bc58 100644 --- a/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/Android0GradleIntegrationTest.kt +++ b/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/Android0GradleIntegrationTest.kt @@ -11,19 +11,7 @@ class Android0GradleIntegrationTest(override val versions: BuildVersions) : Abst companion object { @get:JvmStatic @get:Parameters(name = "{0}") - val versions = BuildVersions.permutations( - gradleVersions = listOf("6.6", *ifExhaustive("5.6.4")), - kotlinVersions = listOf("1.4.0", *ifExhaustive("1.3.72")), - androidGradlePluginVersions = listOf("3.5.3", *ifExhaustive("3.6.3")) - ) + BuildVersions.permutations( - gradleVersions = listOf("6.6", *ifExhaustive("6.1.1")), - kotlinVersions = listOf("1.4.0", *ifExhaustive("1.3.72")), - androidGradlePluginVersions = listOf("4.0.0") - ) + BuildVersions.permutations( - gradleVersions = listOf("7.3"), - kotlinVersions = listOf("1.6.10", "1.6.0", "1.5.31", *ifExhaustive("1.4.0", "1.3.72")), - androidGradlePluginVersions = listOf("7.0.0") - ) + val versions = TestedVersions.ANDROID } @BeforeTest diff --git a/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/BasicCachingIntegrationTest.kt b/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/BasicCachingIntegrationTest.kt index 2207a13f..f47f7e2a 100644 --- a/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/BasicCachingIntegrationTest.kt +++ b/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/BasicCachingIntegrationTest.kt @@ -10,13 +10,7 @@ class BasicCachingIntegrationTest(override val versions: BuildVersions) : Abstra companion object { @get:JvmStatic @get:Parameters(name = "{0}") - val versions = BuildVersions.permutations( - gradleVersions = listOf("7.0", *ifExhaustive("6.6", "6.1.1")), - kotlinVersions = listOf("1.3.30", *ifExhaustive("1.3.72", "1.4.32"), "1.5.0") - ) + BuildVersions.permutations( - gradleVersions = listOf("5.6.4", "6.0"), - kotlinVersions = listOf("1.3.30", *ifExhaustive("1.4.32")) - ) + val versions = TestedVersions.BASE } @BeforeTest diff --git a/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/BasicGradleIntegrationTest.kt b/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/BasicGradleIntegrationTest.kt index b7930f67..58383805 100644 --- a/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/BasicGradleIntegrationTest.kt +++ b/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/BasicGradleIntegrationTest.kt @@ -10,13 +10,7 @@ class BasicGradleIntegrationTest(override val versions: BuildVersions) : Abstrac companion object { @get:JvmStatic @get:Parameters(name = "{0}") - val versions = BuildVersions.permutations( - gradleVersions = listOf("7.3", *ifExhaustive("7.2", "7.0", "6.6", "6.3", "6.2.2", "6.1.1")), - kotlinVersions = listOf("1.3.30", *ifExhaustive("1.3.72", "1.4.32"), "1.5.0", "1.5.31", "1.6.0", "1.6.10") - ) + BuildVersions.permutations( - gradleVersions = listOf("5.6.4", "6.0"), - kotlinVersions = listOf("1.3.30", *ifExhaustive("1.3.72", "1.4.32")) - ) + val versions = TestedVersions.BASE } @BeforeTest @@ -162,7 +156,7 @@ class BasicGradleIntegrationTest(override val versions: BuildVersions) : Abstrac val indexFile = File(this, "index.html") assertTrue(indexFile.isFile, "Missing index.html") assertTrue( - """<title>Basic Project 1.5-SNAPSHOT API </title>""" in indexFile.readText(), + """<title>Basic Project 1.6.10-SNAPSHOT API </title>""" in indexFile.readText(), "Header with version number not present in index.html" ) diff --git a/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/BasicGroovyIntegrationTest.kt b/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/BasicGroovyIntegrationTest.kt index 78e835eb..2a038f37 100644 --- a/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/BasicGroovyIntegrationTest.kt +++ b/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/BasicGroovyIntegrationTest.kt @@ -14,13 +14,7 @@ class BasicGroovyIntegrationTest(override val versions: BuildVersions) : Abstrac companion object { @get:JvmStatic @get:Parameterized.Parameters(name = "{0}") - val versions = BuildVersions.permutations( - gradleVersions = listOf("7.0", "6.6"), - kotlinVersions = listOf("1.3.72", "1.4.0", "1.5.10") - ) + BuildVersions.permutations( - gradleVersions = listOf("5.6.4"), - kotlinVersions = listOf("1.4.0", "1.4.32") - ) + val versions = TestedVersions.BASE } @BeforeTest diff --git a/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/Collector0IntegrationTest.kt b/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/Collector0IntegrationTest.kt index 12e6cfad..54035061 100644 --- a/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/Collector0IntegrationTest.kt +++ b/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/Collector0IntegrationTest.kt @@ -9,10 +9,7 @@ class Collector0IntegrationTest(override val versions: BuildVersions) : Abstract companion object { @get:JvmStatic @get:Parameterized.Parameters(name = "{0}") - val versions = BuildVersions.permutations( - gradleVersions = listOf("7.0", "6.6", "6.1.1"), - kotlinVersions = listOf("1.5.10", "1.4.0") - ) + val versions = TestedVersions.BASE } @BeforeTest diff --git a/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/GradleRelocatedCachingIntegrationTest.kt b/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/GradleRelocatedCachingIntegrationTest.kt index d82c3827..28b8d22c 100644 --- a/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/GradleRelocatedCachingIntegrationTest.kt +++ b/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/GradleRelocatedCachingIntegrationTest.kt @@ -10,13 +10,7 @@ class GradleRelocatedCachingIntegrationTest(override val versions: BuildVersions companion object { @get:JvmStatic @get:Parameters(name = "{0}") - val versions = BuildVersions.permutations( - gradleVersions = listOf("7.0", *ifExhaustive("6.6", "6.1.1")), - kotlinVersions = listOf("1.3.30", *ifExhaustive("1.3.72", "1.4.32"), "1.5.0") - ) + BuildVersions.permutations( - gradleVersions = listOf("5.6.4", "6.0"), - kotlinVersions = listOf("1.3.30", *ifExhaustive("1.4.32")) - ) + val versions = TestedVersions.BASE } @BeforeTest diff --git a/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/JsIRGradleIntegrationTest.kt b/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/JsIRGradleIntegrationTest.kt index c0d9bc93..ef9d67cc 100644 --- a/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/JsIRGradleIntegrationTest.kt +++ b/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/JsIRGradleIntegrationTest.kt @@ -10,16 +10,15 @@ class JsIRGradleIntegrationTest(override val versions: BuildVersions) : Abstract companion object { @get:JvmStatic @get:Parameters(name = "{0}") - val versions = BuildVersions.permutations( - gradleVersions = listOf("7.2", *ifExhaustive("7.0")), - kotlinVersions = listOf("1.5.0", "1.5.30", "1.5.31") - ) + val versions = TestedVersions.BASE } - val reactVersionArg = mapOf( - "1.5.0" to "-Pdokka_it_react_kotlin_version=5.2.0-pre.202-kotlin-1.5.0", - "1.5.30" to "-Pdokka_it_react_kotlin_version=5.2.0-pre.246-kotlin-1.5.30", - "1.5.31" to "-Pdokka_it_react_kotlin_version=5.2.0-pre.251-kotlin-1.5.31" + private val ignoredKotlinVersions = setOf( + // There were some breaking refactoring changes in kotlin react wrapper libs in 1.4.0 -> 1.5.0, + // some core react classes were moved from `react-router-dom` to `react` artifacts. + // Writing an integration test project that would work for both 1.4.0 and 1.5.0 would involve + // ugly solutions, so these versions are ignored. Not a big loss given they are deprecated as of this moment. + "1.4.0", "1.4.32" ) @BeforeTest @@ -37,7 +36,11 @@ class JsIRGradleIntegrationTest(override val versions: BuildVersions) : Abstract @Test fun execute() { - val reactPropertyArg = reactVersionArg[versions.kotlinVersion] + if (ignoredKotlinVersions.contains(versions.kotlinVersion)) { + return + } + + val reactPropertyArg = TestedVersions.KT_REACT_WRAPPER_MAPPING[versions.kotlinVersion] ?: throw IllegalStateException("Unspecified version of react for kotlin " + versions.kotlinVersion) val result = createGradleRunner(reactPropertyArg, "dokkaHtml", "-i", "-s").buildRelaxed() assertEquals(TaskOutcome.SUCCESS, assertNotNull(result.task(":dokkaHtml")).outcome) diff --git a/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/MultiModule0IntegrationTest.kt b/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/MultiModule0IntegrationTest.kt index 35823a91..3c0bc5a5 100644 --- a/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/MultiModule0IntegrationTest.kt +++ b/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/MultiModule0IntegrationTest.kt @@ -9,10 +9,7 @@ class MultiModule0IntegrationTest(override val versions: BuildVersions) : Abstra companion object { @get:JvmStatic @get:Parameterized.Parameters(name = "{0}") - val versions = BuildVersions.permutations( - gradleVersions = listOf("7.3", "7.2", "7.0", "6.6", "6.1.1"), - kotlinVersions = listOf("1.6.10", "1.6.0", "1.5.31", "1.5.0", "1.4.0") - ) + val versions = TestedVersions.BASE } @BeforeTest diff --git a/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/MultiModule1IntegrationTest.kt b/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/MultiModule1IntegrationTest.kt index 76be6cb8..ffc4705a 100644 --- a/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/MultiModule1IntegrationTest.kt +++ b/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/MultiModule1IntegrationTest.kt @@ -12,10 +12,7 @@ class MultiModule1IntegrationTest(override val versions: BuildVersions) : Abstra companion object { @get:JvmStatic @get:Parameterized.Parameters(name = "{0}") - val versions = BuildVersions.permutations( - gradleVersions = listOf("6.6", "6.6", "6.1.1"), - kotlinVersions = listOf("1.6.10", "1.4.0") - ) + val versions = TestedVersions.BASE } @BeforeTest diff --git a/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/Multiplatform0GradleIntegrationTest.kt b/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/Multiplatform0GradleIntegrationTest.kt index 8f7ccbd3..55f4ce64 100644 --- a/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/Multiplatform0GradleIntegrationTest.kt +++ b/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/Multiplatform0GradleIntegrationTest.kt @@ -10,10 +10,7 @@ class Multiplatform0GradleIntegrationTest(override val versions: BuildVersions) companion object { @get:JvmStatic @get:Parameterized.Parameters(name = "{0}") - val versions = BuildVersions.permutations( - gradleVersions = listOf("6.6", "6.1.1"), - kotlinVersions = listOf("1.4.0") - ) + val versions = TestedVersions.BASE } @BeforeTest diff --git a/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/TestedVersions.kt b/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/TestedVersions.kt new file mode 100644 index 00000000..85f40cb7 --- /dev/null +++ b/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/TestedVersions.kt @@ -0,0 +1,36 @@ +package org.jetbrains.dokka.it.gradle + +internal object TestedVersions { + + val BASE = + BuildVersions.permutations( + gradleVersions = listOf("7.3", "6.9"), + kotlinVersions = listOf("1.6.10", "1.5.31", "1.4.32"), + ) + BuildVersions.permutations( + gradleVersions = listOf(*ifExhaustive("7.0", "6.1.1")), + kotlinVersions = listOf(*ifExhaustive("1.6.0", "1.5.0", "1.4.0")) + ) + + /** + * Starting with version 7, major android gradle plugin versions are aligned + * with major gradle versions, i.e android plugin 7.0.0 will not work with gradle 6.9 + */ + val ANDROID = + BuildVersions.permutations( + gradleVersions = listOf("7.3", *ifExhaustive("7.0")), + kotlinVersions = listOf("1.6.10", "1.5.31", "1.4.32"), + androidGradlePluginVersions = listOf("7.0.0") + ) + BuildVersions.permutations( + gradleVersions = listOf("6.9", *ifExhaustive("6.1.1", "5.6.4")), + kotlinVersions = listOf("1.6.10", "1.5.31", "1.4.32"), + androidGradlePluginVersions = listOf("4.0.0", *ifExhaustive("3.6.3")) + ) + + // https://mvnrepository.com/artifact/org.jetbrains.kotlin-wrappers/kotlin-react + val KT_REACT_WRAPPER_MAPPING = mapOf( + "1.5.0" to "-Preact_version=17.0.2-pre.204-kotlin-1.5.0", + "1.6.0" to "-Preact_version=17.0.2-pre.280-kotlin-1.6.0", + "1.5.31" to "-Preact_version=17.0.2-pre.265-kotlin-1.5.31", + "1.6.10" to "-Preact_version=18.0.0-pre.325-kotlin-1.6.10", + ) +}
\ No newline at end of file diff --git a/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/Versioning0IntegrationTest.kt b/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/Versioning0IntegrationTest.kt index 56da7bc9..b9cd7c29 100644 --- a/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/Versioning0IntegrationTest.kt +++ b/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/Versioning0IntegrationTest.kt @@ -10,10 +10,7 @@ class Versioning0IntegrationTest(override val versions: BuildVersions) : Abstrac companion object { @get:JvmStatic @get:Parameterized.Parameters(name = "{0}") - val versions = BuildVersions.permutations( - gradleVersions = listOf("7.0", "7.3"), - kotlinVersions = listOf("1.6.10", "1.6.0", "1.5.31", "1.5.0") - ) + val versions = TestedVersions.BASE } @BeforeTest |