[Gradle][Tests][MPP] Inherit mpp tests from MPPBaseTest
This commit is contained in:
committed by
Space Team
parent
d07fd15565
commit
11e4cb12b7
+35
-8
@@ -61,7 +61,11 @@ class ConfigurationCacheIT : AbstractConfigurationCacheIT() {
|
||||
|
||||
@MppGradlePluginTests
|
||||
@DisplayName("works with MPP publishing")
|
||||
@GradleTestVersions(minVersion = TestVersions.Gradle.G_7_4)
|
||||
@GradleTestVersions(
|
||||
minVersion = TestVersions.Gradle.G_7_4,
|
||||
maxVersion = BETA_GRADLE,
|
||||
additionalVersions = [TestVersions.Gradle.MAX_SUPPORTED]
|
||||
)
|
||||
@GradleTest
|
||||
fun testMppWithMavenPublish(gradleVersion: GradleVersion) {
|
||||
project("new-mpp-lib-and-app/sample-lib", gradleVersion) {
|
||||
@@ -77,7 +81,11 @@ class ConfigurationCacheIT : AbstractConfigurationCacheIT() {
|
||||
|
||||
@NativeGradlePluginTests
|
||||
@DisplayName("works with native tasks in complex project")
|
||||
@GradleTestVersions(minVersion = TestVersions.Gradle.G_7_4)
|
||||
@GradleTestVersions(
|
||||
minVersion = TestVersions.Gradle.G_7_4,
|
||||
maxVersion = BETA_GRADLE,
|
||||
additionalVersions = [TestVersions.Gradle.MAX_SUPPORTED]
|
||||
)
|
||||
@GradleTest
|
||||
fun testNativeTasks(gradleVersion: GradleVersion) {
|
||||
val expectedTasks = mutableListOf(
|
||||
@@ -114,7 +122,11 @@ class ConfigurationCacheIT : AbstractConfigurationCacheIT() {
|
||||
|
||||
@NativeGradlePluginTests
|
||||
@DisplayName("works with commonizer")
|
||||
@GradleTestVersions(minVersion = TestVersions.Gradle.G_7_4)
|
||||
@GradleTestVersions(
|
||||
minVersion = TestVersions.Gradle.G_7_4,
|
||||
maxVersion = BETA_GRADLE,
|
||||
additionalVersions = [TestVersions.Gradle.MAX_SUPPORTED]
|
||||
)
|
||||
@GradleTest
|
||||
fun testCommonizer(gradleVersion: GradleVersion) {
|
||||
project("native-configuration-cache", gradleVersion) {
|
||||
@@ -154,7 +166,11 @@ class ConfigurationCacheIT : AbstractConfigurationCacheIT() {
|
||||
// Set min Gradle version to 6.8 because of using DependencyResolutionManagement API to add repositories.
|
||||
@JvmGradlePluginTests
|
||||
@DisplayName("with instance execution")
|
||||
@GradleTestVersions(minVersion = TestVersions.Gradle.G_6_8)
|
||||
@GradleTestVersions(
|
||||
minVersion = TestVersions.Gradle.G_6_8,
|
||||
maxVersion = BETA_GRADLE,
|
||||
additionalVersions = [TestVersions.Gradle.MAX_SUPPORTED]
|
||||
)
|
||||
@GradleTest
|
||||
fun testInstantExecution(gradleVersion: GradleVersion) {
|
||||
project("instantExecution", gradleVersion) {
|
||||
@@ -179,7 +195,11 @@ class ConfigurationCacheIT : AbstractConfigurationCacheIT() {
|
||||
|
||||
@JvmGradlePluginTests
|
||||
@DisplayName("instant execution works with included build plugin")
|
||||
@GradleTestVersions(minVersion = TestVersions.Gradle.G_6_8)
|
||||
@GradleTestVersions(
|
||||
minVersion = TestVersions.Gradle.G_6_8,
|
||||
maxVersion = BETA_GRADLE,
|
||||
additionalVersions = [TestVersions.Gradle.MAX_SUPPORTED]
|
||||
)
|
||||
@GradleTest
|
||||
fun testInstantExecutionWithIncludedBuildPlugin(gradleVersion: GradleVersion) {
|
||||
project("instantExecutionWithIncludedBuildPlugin", gradleVersion) {
|
||||
@@ -192,7 +212,11 @@ class ConfigurationCacheIT : AbstractConfigurationCacheIT() {
|
||||
|
||||
@MppGradlePluginTests
|
||||
@DisplayName("works in MPP withJava project")
|
||||
@GradleTestVersions(minVersion = TestVersions.Gradle.G_7_0)
|
||||
@GradleTestVersions(
|
||||
minVersion = TestVersions.Gradle.G_7_0,
|
||||
maxVersion = BETA_GRADLE,
|
||||
additionalVersions = [TestVersions.Gradle.MAX_SUPPORTED]
|
||||
)
|
||||
@GradleTest
|
||||
fun testJvmWithJavaConfigurationCache(gradleVersion: GradleVersion) {
|
||||
project("mppJvmWithJava", gradleVersion) {
|
||||
@@ -224,8 +248,11 @@ class ConfigurationCacheIT : AbstractConfigurationCacheIT() {
|
||||
}
|
||||
|
||||
@JvmGradlePluginTests
|
||||
@DisplayName("with build build scan report")
|
||||
@DisplayName("with build scan report")
|
||||
@GradleTest
|
||||
@GradleTestVersions( // remove restriction after fix KT-57645
|
||||
maxVersion = TestVersions.Gradle.MAX_SUPPORTED
|
||||
)
|
||||
fun testBuildScanReportSmokeTestForConfigurationCache(gradleVersion: GradleVersion) {
|
||||
project("simpleProject", gradleVersion) {
|
||||
val buildOptions = defaultBuildOptions.copy(buildReport = listOf(BuildReportType.BUILD_SCAN), logLevel = LogLevel.DEBUG)
|
||||
@@ -240,7 +267,7 @@ class ConfigurationCacheIT : AbstractConfigurationCacheIT() {
|
||||
}
|
||||
}
|
||||
|
||||
abstract class AbstractConfigurationCacheIT : KGPBaseTest() {
|
||||
abstract class AbstractConfigurationCacheIT : MPPBaseTest() {
|
||||
override val defaultBuildOptions =
|
||||
super.defaultBuildOptions.copy(configurationCache = true)
|
||||
|
||||
|
||||
+1
-5
@@ -31,12 +31,8 @@ import kotlin.test.assertTrue
|
||||
import kotlin.test.fail
|
||||
|
||||
@MppGradlePluginTests
|
||||
@GradleTestVersions(
|
||||
maxVersion = TestVersions.Gradle.NEXT_RELEASE,
|
||||
additionalVersions = [TestVersions.Gradle.MAX_SUPPORTED]
|
||||
)
|
||||
@DisplayName("Hierarchical multiplatform")
|
||||
open class HierarchicalMppIT : KGPBaseTest() {
|
||||
open class HierarchicalMppIT : MPPBaseTest() {
|
||||
|
||||
private val String.withPrefix get() = "hierarchical-mpp-published-modules/$this"
|
||||
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ class MPPBuildReproducibilityIT : KGPBaseTest() {
|
||||
@GradleTest
|
||||
@GradleTestVersions(
|
||||
minVersion = TestVersions.Gradle.G_7_0,
|
||||
maxVersion = TestVersions.Gradle.NEXT_RELEASE,
|
||||
maxVersion = BETA_GRADLE,
|
||||
additionalVersions = [TestVersions.Gradle.MAX_SUPPORTED]
|
||||
)
|
||||
@DisplayName("Check if consecutive builds produce same binaries: Simple Multiplatform project")
|
||||
|
||||
+1
-5
@@ -30,12 +30,8 @@ import kotlin.test.assertEquals
|
||||
import kotlin.test.fail
|
||||
|
||||
@MppGradlePluginTests
|
||||
@GradleTestVersions(
|
||||
maxVersion = TestVersions.Gradle.NEXT_RELEASE,
|
||||
additionalVersions = [TestVersions.Gradle.MAX_SUPPORTED]
|
||||
)
|
||||
@DisplayName("Multiplatform IDE dependency resolution")
|
||||
class MppIdeDependencyResolutionIT : KGPBaseTest() {
|
||||
class MppIdeDependencyResolutionIT : MPPBaseTest() {
|
||||
@GradleTest
|
||||
fun testCommonizedPlatformDependencyResolution(gradleVersion: GradleVersion) {
|
||||
with(project("commonizeHierarchically", gradleVersion)) {
|
||||
|
||||
+10
-10
@@ -26,9 +26,7 @@ import kotlin.test.*
|
||||
|
||||
@DisplayName("kotlin-android with mpp")
|
||||
@AndroidGradlePluginTests
|
||||
@AndroidTestVersions(additionalVersions = [TestVersions.AGP.NEXT_RELEASE])
|
||||
@GradleTestVersions(maxVersion = TestVersions.Gradle.NEXT_RELEASE, additionalVersions = [TestVersions.Gradle.MAX_SUPPORTED])
|
||||
class KotlinAndroidMppIT : KGPBaseTest() {
|
||||
class KotlinAndroidMppIT : MPPBaseTest() {
|
||||
@DisplayName("KT-50736: whenEvaluated waits for AGP being applied later")
|
||||
@GradleAndroidTest
|
||||
fun testAfterEvaluateOrdering(
|
||||
@@ -542,7 +540,6 @@ class KotlinAndroidMppIT : KGPBaseTest() {
|
||||
}
|
||||
}
|
||||
|
||||
// AGP max version is limited due to https://youtrack.jetbrains.com/issue/KT-51940/HMPP-resolves-configurations-during-configuration
|
||||
@DisplayName("android app can depend on mpp lib")
|
||||
@GradleAndroidTest
|
||||
fun testAndroidWithNewMppApp(
|
||||
@@ -821,8 +818,11 @@ class KotlinAndroidMppIT : KGPBaseTest() {
|
||||
*/
|
||||
@DisplayName("KT-49798: com.android.build.api.attributes.AgpVersionAttr is not published")
|
||||
@GradleAndroidTest
|
||||
@AndroidTestVersions(minVersion = TestVersions.AGP.AGP_71)
|
||||
@GradleTestVersions(minVersion = TestVersions.Gradle.G_7_2) // due AGP version limit ^
|
||||
@AndroidTestVersions(minVersion = TestVersions.AGP.AGP_71, additionalVersions = [BETA_AGP])
|
||||
@GradleTestVersions(
|
||||
minVersion = TestVersions.Gradle.G_7_2, maxVersion = BETA_GRADLE,
|
||||
additionalVersions = [TestVersions.Gradle.MAX_SUPPORTED]
|
||||
)// due AGP version limit ^
|
||||
fun testKT49798AgpVersionAttrNotPublished(
|
||||
gradleVersion: GradleVersion,
|
||||
agpVersion: String,
|
||||
@@ -855,9 +855,9 @@ class KotlinAndroidMppIT : KGPBaseTest() {
|
||||
|
||||
@DisplayName("produced artifacts are consumable by projects with various AGP versions")
|
||||
@GradleAndroidTest
|
||||
@AndroidTestVersions(minVersion = TestVersions.AGP.AGP_71, additionalVersions = [TestVersions.AGP.NEXT_RELEASE])
|
||||
@AndroidTestVersions(minVersion = TestVersions.AGP.AGP_71, additionalVersions = [BETA_AGP])
|
||||
@GradleTestVersions(
|
||||
minVersion = TestVersions.Gradle.G_7_2, maxVersion = TestVersions.Gradle.NEXT_RELEASE,
|
||||
minVersion = TestVersions.Gradle.G_7_2, maxVersion = BETA_GRADLE,
|
||||
additionalVersions = [TestVersions.Gradle.MAX_SUPPORTED]
|
||||
) // due AGP version limit ^
|
||||
fun testAndroidMultiplatformPublicationAGPCompatibility(
|
||||
@@ -926,9 +926,9 @@ class KotlinAndroidMppIT : KGPBaseTest() {
|
||||
|
||||
@DisplayName("KT-49877, KT-35916: associate compilation dependencies are passed correctly to android test compilations")
|
||||
@GradleAndroidTest
|
||||
@AndroidTestVersions(minVersion = TestVersions.AGP.AGP_71, additionalVersions = [TestVersions.AGP.NEXT_RELEASE])
|
||||
@AndroidTestVersions(minVersion = TestVersions.AGP.AGP_71, additionalVersions = [BETA_AGP])
|
||||
@GradleTestVersions(
|
||||
minVersion = TestVersions.Gradle.G_7_2, maxVersion = TestVersions.Gradle.NEXT_RELEASE,
|
||||
minVersion = TestVersions.Gradle.G_7_2, maxVersion = BETA_GRADLE,
|
||||
additionalVersions = [TestVersions.Gradle.MAX_SUPPORTED]
|
||||
) // due AGP version limit ^
|
||||
fun testAssociateCompilationDependenciesArePassedToAndroidTestCompilations(
|
||||
|
||||
+2
-2
@@ -17,10 +17,10 @@ class MultiplatformAndroidSourceSetLayoutV2IT : KGPBaseTest() {
|
||||
|
||||
@GradleAndroidTest
|
||||
@DisplayName("test Android project with flavors")
|
||||
@AndroidTestVersions(minVersion = "7.0.4", additionalVersions = [TestVersions.AGP.NEXT_RELEASE])
|
||||
@AndroidTestVersions(minVersion = "7.0.4", additionalVersions = [BETA_AGP])
|
||||
@GradleTestVersions(
|
||||
minVersion = TestVersions.Gradle.G_7_0,
|
||||
maxVersion = TestVersions.Gradle.NEXT_RELEASE,
|
||||
maxVersion = BETA_GRADLE,
|
||||
additionalVersions = [TestVersions.Gradle.MAX_SUPPORTED]
|
||||
) // due AGP version limit ^
|
||||
fun testProjectWithFlavors(gradleVersion: GradleVersion, agpVersion: String, jdkVersion: JdkVersions.ProvidedJdk) {
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@ import org.junit.jupiter.api.DisplayName
|
||||
|
||||
@MppGradlePluginTests
|
||||
@DisplayName("Tests for aggregating kotlin test reports")
|
||||
class AggregatingKotlinTestReportIT : KGPBaseTest() {
|
||||
class AggregatingKotlinTestReportIT : MPPBaseTest() {
|
||||
@DisplayName("KT-54506: `allTests` is not false positively up-to-date after failure")
|
||||
@GradleTest
|
||||
fun testFailedTestsAreNotUpToDate(gradleVersion: GradleVersion) {
|
||||
|
||||
+1
-5
@@ -10,12 +10,8 @@ import org.jetbrains.kotlin.gradle.testbase.*
|
||||
import org.junit.jupiter.api.DisplayName
|
||||
|
||||
@MppGradlePluginTests
|
||||
@GradleTestVersions(
|
||||
maxVersion = TestVersions.Gradle.NEXT_RELEASE,
|
||||
additionalVersions = [TestVersions.Gradle.MAX_SUPPORTED]
|
||||
)
|
||||
@DisplayName("Broken task configuration avoidance doesn't lead to build failures at least with simple setups")
|
||||
class BrokenLazyConfigurationIT : KGPBaseTest() {
|
||||
class BrokenLazyConfigurationIT : MPPBaseTest() {
|
||||
@GradleTest
|
||||
@DisplayName("works in JVM")
|
||||
fun testBrokenTcaInJvm(gradleVersion: GradleVersion) {
|
||||
|
||||
+1
-5
@@ -16,12 +16,8 @@ import org.junit.jupiter.api.DisplayName
|
||||
import org.junit.jupiter.api.condition.OS
|
||||
|
||||
@MppGradlePluginTests
|
||||
@GradleTestVersions(
|
||||
maxVersion = TestVersions.Gradle.NEXT_RELEASE,
|
||||
additionalVersions = [TestVersions.Gradle.MAX_SUPPORTED]
|
||||
)
|
||||
@DisplayName("Tests for multiplatform with composite builds")
|
||||
class MppCompositeBuildIT : KGPBaseTest() {
|
||||
class MppCompositeBuildIT : MPPBaseTest() {
|
||||
@GradleTest
|
||||
fun `test - sample0 - ide dependencies`(gradleVersion: GradleVersion) {
|
||||
val producer = project("mpp-composite-build/sample0/producerBuild", gradleVersion)
|
||||
|
||||
+1
-5
@@ -14,11 +14,7 @@ import kotlin.test.assertFalse
|
||||
import kotlin.test.assertTrue
|
||||
|
||||
@MppGradlePluginTests
|
||||
@GradleTestVersions(
|
||||
maxVersion = TestVersions.Gradle.NEXT_RELEASE,
|
||||
additionalVersions = [TestVersions.Gradle.MAX_SUPPORTED]
|
||||
)
|
||||
class MppDiagnosticsIt : KGPBaseTest() {
|
||||
class MppDiagnosticsIt : MPPBaseTest() {
|
||||
@GradleTest
|
||||
fun testDeprecatedProperties(gradleVersion: GradleVersion) {
|
||||
project("mppDeprecatedProperties", gradleVersion) {
|
||||
|
||||
+1
-5
@@ -15,12 +15,8 @@ import org.junit.jupiter.api.DisplayName
|
||||
import org.junit.jupiter.api.fail
|
||||
|
||||
@MppGradlePluginTests
|
||||
@GradleTestVersions(
|
||||
maxVersion = TestVersions.Gradle.NEXT_RELEASE,
|
||||
additionalVersions = [TestVersions.Gradle.MAX_SUPPORTED]
|
||||
)
|
||||
@DisplayName("Tests for multiplatform | shared native compilations")
|
||||
class MppSharedNativeCompileIT : KGPBaseTest() {
|
||||
class MppSharedNativeCompileIT : MPPBaseTest() {
|
||||
/**
|
||||
* https://youtrack.jetbrains.com/issue/KT-56205/Shared-Native-Compilation-False-positive-w-Could-not-find-warnings-on-metadata-klibs
|
||||
* metadata klib should not contain any dependsOn= in their klib manifest.
|
||||
|
||||
+2
-2
@@ -12,10 +12,10 @@ import org.junit.jupiter.api.DisplayName
|
||||
|
||||
@MppGradlePluginTests
|
||||
@DisplayName("Tests for multiplatform testing")
|
||||
class MppTestsIT : KGPBaseTest() {
|
||||
class MppTestsIT : MPPBaseTest() {
|
||||
@DisplayName("KT-54634: MPP testing logic is compatible with API changes in Gradle 7.6")
|
||||
@GradleTestVersions(
|
||||
maxVersion = TestVersions.Gradle.NEXT_RELEASE,
|
||||
maxVersion = BETA_GRADLE,
|
||||
additionalVersions = [TestVersions.Gradle.G_7_5, TestVersions.Gradle.G_7_6]
|
||||
)
|
||||
@GradleTest
|
||||
|
||||
+1
-5
@@ -9,11 +9,7 @@ import org.gradle.util.GradleVersion
|
||||
import org.jetbrains.kotlin.gradle.testbase.*
|
||||
|
||||
@MppGradlePluginTests
|
||||
@GradleTestVersions(
|
||||
maxVersion = TestVersions.Gradle.NEXT_RELEASE,
|
||||
additionalVersions = [TestVersions.Gradle.MAX_SUPPORTED]
|
||||
)
|
||||
class CinteropIT : KGPBaseTest() {
|
||||
class CinteropIT : MPPBaseTest() {
|
||||
|
||||
@GradleTest
|
||||
fun `rerun cinterop after a header changing`(gradleVersion: GradleVersion) {
|
||||
|
||||
Reference in New Issue
Block a user