[kotlin] KTIJ-28597: gradle-java.tests => .k1, .k2, .shared

Launching tests against K2-plugin literally means having a dedicated K2-module
with `kotlin.plugin.k2` dependency.

This commit splits existing `kotlin.gradle.gradle-java.tests` module into three
new ones: `.k1`, `.k2`, and `.shared`. K2-module is a target one for future tests.

GitOrigin-RevId: 6071833ed56347ba5a95375ec8606b95a6672fcd
This commit is contained in:
Andrei Klunnyi
2024-03-15 13:10:13 +00:00
committed by intellij-monorepo-bot
parent 7b6847622f
commit c677bc95df
134 changed files with 216 additions and 59 deletions
+4 -2
View File
@@ -1391,7 +1391,9 @@
<module fileurl="file://$PROJECT_DIR$/plugins/kotlin/gradle/code-insight-groovy/kotlin.gradle.code-insight-groovy.iml" filepath="$PROJECT_DIR$/plugins/kotlin/gradle/code-insight-groovy/kotlin.gradle.code-insight-groovy.iml" />
<module fileurl="file://$PROJECT_DIR$/plugins/kotlin/gradle/gradle/kotlin.gradle.gradle.iml" filepath="$PROJECT_DIR$/plugins/kotlin/gradle/gradle/kotlin.gradle.gradle.iml" />
<module fileurl="file://$PROJECT_DIR$/plugins/kotlin/gradle/gradle-java/kotlin.gradle.gradle-java.iml" filepath="$PROJECT_DIR$/plugins/kotlin/gradle/gradle-java/kotlin.gradle.gradle-java.iml" />
<module fileurl="file://$PROJECT_DIR$/plugins/kotlin/gradle/gradle-java/tests/kotlin.gradle.gradle-java.tests.iml" filepath="$PROJECT_DIR$/plugins/kotlin/gradle/gradle-java/tests/kotlin.gradle.gradle-java.tests.iml" />
<module fileurl="file://$PROJECT_DIR$/plugins/kotlin/gradle/gradle-java/tests.k1/kotlin.gradle.gradle-java.tests.k1.iml" filepath="$PROJECT_DIR$/plugins/kotlin/gradle/gradle-java/tests.k1/kotlin.gradle.gradle-java.tests.k1.iml" />
<module fileurl="file://$PROJECT_DIR$/plugins/kotlin/gradle/gradle-java/tests.k2/kotlin.gradle.gradle-java.tests.k2.iml" filepath="$PROJECT_DIR$/plugins/kotlin/gradle/gradle-java/tests.k2/kotlin.gradle.gradle-java.tests.k2.iml" />
<module fileurl="file://$PROJECT_DIR$/plugins/kotlin/gradle/gradle-java/tests.shared/kotlin.gradle.gradle-java.tests.shared.iml" filepath="$PROJECT_DIR$/plugins/kotlin/gradle/gradle-java/tests.shared/kotlin.gradle.gradle-java.tests.shared.iml" />
<module fileurl="file://$PROJECT_DIR$/plugins/kotlin/gradle/gradle-tooling/kotlin.gradle.gradle-tooling.iml" filepath="$PROJECT_DIR$/plugins/kotlin/gradle/gradle-tooling/kotlin.gradle.gradle-tooling.iml" />
<module fileurl="file://$PROJECT_DIR$/plugins/kotlin/gradle/gradle-tooling/impl/kotlin.gradle.gradle-tooling.impl.iml" filepath="$PROJECT_DIR$/plugins/kotlin/gradle/gradle-tooling/impl/kotlin.gradle.gradle-tooling.impl.iml" />
<module fileurl="file://$PROJECT_DIR$/plugins/kotlin/gradle/gradle-tooling/tests/kotlin.gradle.gradle-tooling.tests.iml" filepath="$PROJECT_DIR$/plugins/kotlin/gradle/gradle-tooling/tests/kotlin.gradle.gradle-tooling.tests.iml" />
@@ -1506,4 +1508,4 @@
<module fileurl="file://$PROJECT_DIR$/plugins/kotlin/util/test-generator-fir/kotlin.util.test-generator-fir.iml" filepath="$PROJECT_DIR$/plugins/kotlin/util/test-generator-fir/kotlin.util.test-generator-fir.iml" />
</modules>
</component>
</project>
</project>
@@ -55,5 +55,6 @@
<orderEntry type="module" module-name="kotlin.highlighting.shared.tests" />
<orderEntry type="module" module-name="kotlin.j2k.k2.tests" scope="RUNTIME" />
<orderEntry type="module" module-name="kotlin.code-insight.fixes.k2.tests" scope="RUNTIME" />
<orderEntry type="module" module-name="kotlin.gradle.gradle-java.tests.k2" />
</component>
</module>
@@ -22,7 +22,7 @@
<orderEntry type="module" module-name="kotlin.gradle.gradle-tooling" scope="RUNTIME" />
<orderEntry type="module" module-name="kotlin.gradle.gradle-tooling.impl" scope="RUNTIME" />
<orderEntry type="module" module-name="kotlin.gradle.gradle-java" scope="RUNTIME" />
<orderEntry type="module" module-name="kotlin.gradle.gradle-java.tests" scope="RUNTIME" />
<orderEntry type="module" module-name="kotlin.gradle.gradle-java.tests.k1" scope="RUNTIME" />
<orderEntry type="module" module-name="kotlin.gradle.gradle.tests" scope="RUNTIME" />
<orderEntry type="module" module-name="kotlin.gradle.gradle-tooling.tests" scope="RUNTIME" />
<orderEntry type="module" module-name="kotlin.compiler-reference-index.tests" scope="RUNTIME" />
@@ -70,5 +70,6 @@
<orderEntry type="module" module-name="kotlin.base.scripting" scope="RUNTIME" />
<orderEntry type="module" module-name="kotlin.onboarding" scope="RUNTIME" />
<orderEntry type="module" module-name="kotlin.highlighting.shared.tests" scope="RUNTIME" />
<orderEntry type="module" module-name="kotlin.gradle.gradle-java.tests.shared" scope="RUNTIME" />
</component>
</module>
@@ -41,9 +41,9 @@
<orderEntry type="module" module-name="kotlin.completion.tests.shared" />
<orderEntry type="module" module-name="kotlin.fir" />
<orderEntry type="module" module-name="intellij.gradle.tests" />
<orderEntry type="module" module-name="kotlin.gradle.gradle-java.tests" />
<orderEntry type="module" module-name="kotlin.idea.tests" />
<orderEntry type="module" module-name="kotlin.test-framework" />
<orderEntry type="module" module-name="kotlin.base.indices" scope="TEST" />
<orderEntry type="module" module-name="kotlin.gradle.gradle-java.tests.shared" scope="TEST" />
</component>
</module>
@@ -66,5 +66,6 @@
<orderEntry type="library" name="assertJ" level="project" />
<orderEntry type="module" module-name="kotlin.highlighting.shared" />
<orderEntry type="module" module-name="kotlin.base.psi" scope="TEST" />
<orderEntry type="module" module-name="kotlin.gradle.gradle-java.tests.shared" scope="TEST" />
</component>
</module>
@@ -1,4 +1,4 @@
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package org.jetbrains.kotlin.idea.codeInsight.gradle
@@ -23,8 +23,9 @@ import org.jetbrains.plugins.gradle.tooling.annotation.TargetVersions
import org.jetbrains.plugins.gradle.util.GradleConstants
import org.junit.Ignore
import org.junit.Test
import java.io.File
abstract class GradleBuildFileHighlightingTest : KotlinGradleImportingTestCase() {
abstract class GradleBuildFileHighlightingTest : KotlinGradleImportingTestCase() { // TODO: remove once generated analogue is available
protected fun withHighLightingFilterChecked(file: VirtualFile, block: () -> Unit) = runBlocking {
val psiFile = readAction {
@@ -56,6 +57,47 @@ abstract class GradleBuildFileHighlightingTest : KotlinGradleImportingTestCase()
}
}
private fun String.relativeToProjectRoot(): String =
substringAfter("${projectRoot.path}/")
private fun List<VirtualFile>.relativeToProjectRoot(): List<String> =
map { it.path.relativeToProjectRoot() }
protected fun List<VirtualFile>.inHighlightingOrder(): List<VirtualFile> {
val ktsFiles = filter { "kts" == it.extension }
println("Detected .kts files: ${ktsFiles.relativeToProjectRoot()}")
val highlightingInstructionsFile = File(testDataDirectory(), "highlighting.instructions")
return if (highlightingInstructionsFile.exists()) {
val pathToFile = ktsFiles.associateBy { it.path.relativeToProjectRoot() }
val instructions = highlightingInstructionsFile.readLines()
val filesInConfiguredOrder = instructions.mapNotNull { pathToFile[it] }
println("'highlighting.instructions' file detected. Using the following order of files: ${filesInConfiguredOrder.relativeToProjectRoot()}")
filesInConfiguredOrder
} else {
val filesInShuffledOrder = (ktsFiles + ktsFiles).shuffled()
println("'highlighting.instructions' file is missing. Using default (shuffled) files order: ${filesInShuffledOrder.relativeToProjectRoot()}}")
filesInShuffledOrder
}
}
class SeveralBuildFiles : GradleBuildFileHighlightingTest() {
@TargetVersions("7.6")
@Test
fun testSeveralBuildFiles() {
val files = configureByFiles().inHighlightingOrder()
importProjectUsingSingeModulePerGradleProject()
files.forEach {
checkHighlighting(it)
}
}
}
class ComplexBuildGradleKts : GradleBuildFileHighlightingTest() {
@Ignore
@TargetVersions("4.8+")
@@ -1,4 +1,4 @@
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package org.jetbrains.kotlin.idea.codeInsight.gradle
@@ -14,7 +14,7 @@ import org.junit.runner.RunWith;
* DO NOT MODIFY MANUALLY.
*/
@SuppressWarnings("all")
@TestRoot("gradle/gradle-java/tests")
@TestRoot("gradle/gradle-java/tests.k1")
@TestDataPath("$CONTENT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public abstract class GradleConfigureProjectByChangingFileTestGenerated extends AbstractGradleConfigureProjectByChangingFileTest {
@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/test" isTestSource="true" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="module" module-name="kotlin.plugin.k2" scope="TEST" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="kotlin-stdlib" level="project" />
<orderEntry type="module" module-name="kotlin.gradle.gradle-java.tests.shared" scope="TEST" />
<orderEntry type="library" name="kotlinc.kotlin-jps-common" level="project" />
<orderEntry type="library" name="kotlinc.kotlin-scripting-compiler-impl" level="project" />
<orderEntry type="library" name="kotlinc.kotlin-compiler-tests" level="project" />
<orderEntry type="library" name="JUnit4" level="project" />
<orderEntry type="library" name="kotlin-test" level="project" />
<orderEntry type="module" module-name="kotlin.base.plugin" />
<orderEntry type="module" module-name="kotlin.base.scripting" />
<orderEntry type="module" module-name="kotlin.base.test" />
<orderEntry type="module" module-name="kotlin.test-framework" />
<orderEntry type="module" module-name="intellij.gradle.java" />
<orderEntry type="module" module-name="intellij.gradle.java.tests" scope="TEST" />
<orderEntry type="module" module-name="kotlin.highlighting.shared" />
<orderEntry type="library" scope="TEST" name="kotlinc.kotlin-compiler-common" level="project" />
<orderEntry type="module" module-name="kotlin.idea.tests" scope="TEST" />
<orderEntry type="library" scope="TEST" name="fastutil-min" level="project" />
</component>
</module>
@@ -0,0 +1,55 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/test" isTestSource="true" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="kotlin-stdlib" level="project" />
<orderEntry type="module" module-name="intellij.gradle.tests" scope="TEST" />
<orderEntry type="module" module-name="intellij.platform.testFramework" scope="TEST" />
<orderEntry type="library" name="kotlinc.kotlin-compiler-common" level="project" />
<orderEntry type="module" module-name="kotlin.test-framework" scope="TEST" />
<orderEntry type="module" module-name="intellij.gradle.common" scope="TEST" />
<orderEntry type="module" module-name="kotlin.gradle.gradle-tooling.impl" scope="TEST" />
<orderEntry type="module" module-name="intellij.gradle.toolingExtension.impl" scope="TEST" />
<orderEntry type="library" exported="" name="kotlin-gradle-plugin-idea" level="project" />
<orderEntry type="library" name="kotlin-test" level="project" />
<orderEntry type="module" module-name="kotlin.base.project-model" scope="TEST" />
<orderEntry type="module" module-name="kotlin.highlighting.shared" scope="TEST" />
<orderEntry type="module" module-name="kotlin.base.scripting" scope="TEST" />
<orderEntry type="module" module-name="kotlin.idea.tests" scope="TEST" />
<orderEntry type="library" scope="TEST" name="fastutil-min" level="project" />
<orderEntry type="library" name="kotlinc.kotlin-compiler-tests" level="project" />
<orderEntry type="module" module-name="kotlin.base.facet" scope="TEST" />
<orderEntry type="library" scope="TEST" name="kotlinc.kotlin-jps-plugin-classpath" level="project" />
<orderEntry type="module" module-name="kotlin.base.project-structure" scope="TEST" />
<orderEntry type="module" module-name="kotlin.gradle.gradle-java" />
<orderEntry type="module" module-name="kotlin.gradle.gradle" scope="TEST" />
<orderEntry type="module" module-name="kotlin.completion.tests.shared" scope="TEST" />
<orderEntry type="module" module-name="kotlin.idea" scope="TEST" />
<orderEntry type="module" module-name="kotlin.base.indices" scope="TEST" />
<orderEntry type="module" module-name="kotlin.base.util" scope="TEST" />
<orderEntry type="module" module-name="kotlin.base.psi" scope="TEST" />
<orderEntry type="library" scope="TEST" name="kotlinc.kotlin-jps-common" level="project" />
<orderEntry type="module" module-name="kotlin.base.compiler-configuration" scope="TEST" />
<orderEntry type="module" module-name="kotlin.project-configuration" scope="TEST" />
<orderEntry type="module" module-name="kotlin.base.plugin" scope="TEST" />
<orderEntry type="module" module-name="kotlin.gradle.code-insight-common" scope="TEST" />
<orderEntry type="module" module-name="kotlin.base.analysis" scope="TEST" />
<orderEntry type="module" module-name="kotlin.migration" scope="TEST" />
<orderEntry type="module" module-name="intellij.gradle.java" scope="TEST" />
<orderEntry type="module" module-name="kotlin.base.platforms" scope="TEST" />
<orderEntry type="module" module-name="kotlin.gradle.code-insight-groovy" scope="TEST" />
<orderEntry type="module" module-name="kotlin.inspections" scope="TEST" />
<orderEntry type="module" module-name="intellij.groovy.psi" scope="TEST" />
<orderEntry type="module" module-name="intellij.gradle.java.tests" scope="TEST" />
<orderEntry type="module" module-name="kotlin.run-configurations.jvm" scope="TEST" />
<orderEntry type="module" module-name="intellij.groovy" scope="TEST" />
<orderEntry type="library" scope="TEST" name="kotlinc.kotlin-scripting-common" level="project" />
<orderEntry type="library" scope="TEST" name="kotlinc.kotlin-scripting-compiler-impl" level="project" />
<orderEntry type="module" module-name="kotlin.base.code-insight" scope="TEST" />
</component>
</module>
@@ -1,4 +1,4 @@
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package org.jetbrains.kotlin.gradle
@@ -8,8 +8,9 @@ import com.intellij.openapi.externalSystem.model.project.ProjectData
import com.intellij.openapi.externalSystem.service.project.ProjectDataManager
import com.intellij.openapi.externalSystem.util.ExternalSystemApiUtil
import junit.framework.AssertionFailedError
import org.jetbrains.kotlin.config.IKotlinFacetSettings
import org.jetbrains.kotlin.idea.codeInsight.gradle.KotlinGradleImportingTestCase
import org.jetbrains.kotlin.idea.codeInsight.gradle.facetSettings
import org.jetbrains.kotlin.idea.facet.KotlinFacet
import org.jetbrains.kotlin.idea.gradle.configuration.KotlinSourceSetData
import org.jetbrains.kotlin.idea.gradleJava.configuration.KotlinGradleProjectDataService
import org.jetbrains.plugins.gradle.tooling.annotation.TargetVersions
@@ -17,6 +18,19 @@ import org.jetbrains.plugins.gradle.util.GradleConstants
import org.junit.Test
import org.junit.jupiter.api.assertDoesNotThrow
fun KotlinGradleImportingTestCase.facetSettings(moduleName: String): IKotlinFacetSettings {
val facet = KotlinFacet.get(getModule(moduleName)) ?: error("Kotlin facet not found in module $moduleName")
return facet.configuration.settings
}
val KotlinGradleImportingTestCase.facetSettings: IKotlinFacetSettings
get() = facetSettings("project.main")
val KotlinGradleImportingTestCase.testFacetSettings: IKotlinFacetSettings
get() = facetSettings("project.test")
class KotlinGradleSourceSetDataServiceTest : KotlinGradleImportingTestCase() {
@Test
@TargetVersions("7.6+")
@@ -1,4 +1,4 @@
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package org.jetbrains.kotlin.gradle
import org.jetbrains.kotlin.idea.codeInsight.gradle.MultiplePluginVersionGradleImportingTestCase
@@ -1,4 +1,4 @@
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package org.jetbrains.kotlin.gradle
import com.intellij.openapi.actionSystem.DataContext
@@ -1,4 +1,4 @@
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package org.jetbrains.kotlin.gradle.multiplatformTests
import com.intellij.openapi.externalSystem.importing.ImportSpec
@@ -1,4 +1,4 @@
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package org.jetbrains.kotlin.gradle.multiplatformTests
import org.gradle.util.GradleVersion
@@ -1,4 +1,4 @@
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package org.jetbrains.kotlin.gradle.multiplatformTests
import com.intellij.testFramework.UsefulTestCase
@@ -17,7 +17,7 @@ interface KotlinTestsResolvableProperty {
val defaultValue: String
}
fun KotlinTestsResolvableProperty.resolveFromEnvironment(): String {
fun org.jetbrains.kotlin.gradle.multiplatformTests.KotlinTestsResolvableProperty.resolveFromEnvironment(): String {
val acronymOrValue = System.getenv()[id.uppercase()] ?:
if (!UsefulTestCase.IS_UNDER_TEAMCITY)
return defaultValue
@@ -1,4 +1,4 @@
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package org.jetbrains.kotlin.gradle.multiplatformTests.testFeatures.checkers
import com.intellij.openapi.editor.LogicalPosition
@@ -7,17 +7,14 @@ import com.intellij.psi.search.ProjectScope
import com.intellij.testFramework.assertEqualsToFile
import com.intellij.testFramework.runInEdtAndGet
import org.jetbrains.kotlin.gradle.multiplatformTests.KotlinMppTestsContext
import org.jetbrains.kotlin.gradle.multiplatformTests.TestConfigurationDslScope
import org.jetbrains.kotlin.gradle.multiplatformTests.TestFeature
import org.jetbrains.kotlin.gradle.multiplatformTests.writeAccess
import org.jetbrains.kotlin.idea.KotlinFileType
import org.jetbrains.kotlin.idea.codeInsight.DescriptorToSourceUtilsIde
import org.jetbrains.kotlin.idea.kdoc.findKDoc
import org.jetbrains.kotlin.idea.references.mainReference
import org.jetbrains.kotlin.psi.KtDeclaration
import org.jetbrains.kotlin.psi.KtElement
import org.jetbrains.kotlin.psi.KtNameReferenceExpression
import org.jetbrains.plugins.gradle.settings.GradleSystemSettings
import org.jetbrains.plugins.gradle.settings.GradleSettings
import java.io.File
import java.nio.file.Path
import kotlin.io.path.relativeTo
@@ -26,17 +23,6 @@ class DocumentationCheckerConfig {
var downloadSources: Boolean = false
}
interface DocumentationCheckerDsl {
private val TestConfigurationDslScope.configuration
get() = writeAccess.getConfiguration(DocumentationChecker)
var TestConfigurationDslScope.downloadSources: Boolean
get() = configuration.downloadSources
set(value) {
configuration.downloadSources = value
}
}
object DocumentationChecker : TestFeature<DocumentationCheckerConfig> {
private const val EXPECTED_TEST_DATA = "expected-doc.txt"
private const val CARET_PLACEHOLDER = "<caret:doc>"
@@ -88,7 +74,7 @@ object DocumentationChecker : TestFeature<DocumentationCheckerConfig> {
val element = referenceExpression.mainReference.resolve() as KtElement
val navigationElement = element.navigationElement as? KtDeclaration
?: error("documentation can be only on KtDeclaration")
val docText = navigationElement.findKDoc { DescriptorToSourceUtilsIde.getAnyDeclaration(testProject, it) }?.contentTag?.getContent()
val docText: String? = null/*navigationElement.findKDoc { DescriptorToSourceUtilsIde.getAnyDeclaration(testProject, it) }?.contentTag?.getContent()*/
return@map """
|$relativePath:$line:$offset
|$docText
@@ -0,0 +1,16 @@
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package org.jetbrains.kotlin.gradle.multiplatformTests.testFeatures.checkers
import org.jetbrains.kotlin.gradle.multiplatformTests.TestConfigurationDslScope
import org.jetbrains.kotlin.gradle.multiplatformTests.writeAccess
interface DocumentationCheckerDsl {
val TestConfigurationDslScope.configuration
get() = writeAccess.getConfiguration(DocumentationChecker)
var TestConfigurationDslScope.downloadSources: Boolean
get() = configuration.downloadSources
set(value) {
configuration.downloadSources = value
}
}
@@ -53,10 +53,10 @@ object ContentRootsChecker : WorkspaceModelChecker<ContentRootsChecksConfigurati
override fun renderTestConfigurationDescription(testConfiguration: TestConfiguration): List<String> {
val configuration = testConfiguration.getConfiguration(ContentRootsChecker)
val hiddenSourceRoots = listOfNotNull(
"tests".takeIf { configuration.hideTestSourceRoots },
"resources".takeIf { configuration.hideResourceRoots },
"android-specific roots".takeIf { configuration.hideAndroidSpecificRoots },
"generated".takeIf { configuration.hideGeneratedRoots },
"tests".takeIf { configuration.hideTestSourceRoots },
"resources".takeIf { configuration.hideResourceRoots },
"android-specific roots".takeIf { configuration.hideAndroidSpecificRoots },
"generated".takeIf { configuration.hideGeneratedRoots },
)
return if (hiddenSourceRoots.isEmpty())
@@ -3,6 +3,7 @@ package org.jetbrains.kotlin.gradle.multiplatformTests.testFeatures.checkers.hig
import com.intellij.lang.annotation.HighlightSeverity
import org.jetbrains.kotlin.gradle.multiplatformTests.TestConfigurationDslScope
import org.jetbrains.kotlin.gradle.multiplatformTests.testFeatures.checkers.DocumentationChecker
import org.jetbrains.kotlin.gradle.multiplatformTests.writeAccess
interface HighlightingCheckDsl {
@@ -30,7 +30,6 @@ import org.jetbrains.kotlin.idea.base.util.allScope
import org.jetbrains.kotlin.idea.codeInsight.gradle.combineMultipleFailures
import org.jetbrains.kotlin.idea.stubindex.KotlinFunctionShortNameIndex
import org.jetbrains.kotlin.idea.test.KotlinTestUtils
import org.jetbrains.kotlin.js.backend.ast.REGULAR_EXTENSION
import org.jetbrains.kotlin.name.FqName
import kotlin.coroutines.Continuation
import kotlin.coroutines.resume
@@ -3,7 +3,7 @@ package org.jetbrains.kotlin.gradle.multiplatformTests.testProperties
import org.jetbrains.kotlin.gradle.multiplatformTests.*
object AndroidGradlePluginVersionTestsProperty : KotlinTestsResolvableProperty {
object AndroidGradlePluginVersionTestsProperty : org.jetbrains.kotlin.gradle.multiplatformTests.KotlinTestsResolvableProperty {
override val id: String = "AGP_VERSION"
enum class Value(val acronym: String, val version: String) {
@@ -3,7 +3,7 @@ package org.jetbrains.kotlin.gradle.multiplatformTests.testProperties
import org.jetbrains.kotlin.gradle.multiplatformTests.KotlinTestsResolvableProperty
object GradleVersionTestsProperty : KotlinTestsResolvableProperty {
object GradleVersionTestsProperty : org.jetbrains.kotlin.gradle.multiplatformTests.KotlinTestsResolvableProperty {
override val id: String = "gradle_version"
enum class Value(val acronym: String, val version: String) {
@@ -6,7 +6,7 @@ import org.jetbrains.kotlin.idea.codeInsight.gradle.KotlinGradlePluginVersions
// TODO: deduplicate with [org.jetbrains.kotlin.idea.codeInsight.gradle.KotlinGradlePluginVersions]
// when the new tests infra becomes enabled by default
object KotlinGradlePluginVersionTestsProperty : KotlinTestsResolvableProperty {
object KotlinGradlePluginVersionTestsProperty : org.jetbrains.kotlin.gradle.multiplatformTests.KotlinTestsResolvableProperty {
override val id: String = "KGP_VERSION"
@Suppress("unused") // passed using environment variables
@@ -1,4 +1,4 @@
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package org.jetbrains.kotlin.gradle
@@ -14,7 +14,6 @@ import com.intellij.openapi.vfs.VfsUtilCore
import com.intellij.openapi.vfs.VirtualFile
import com.intellij.util.PathUtil
import org.intellij.lang.annotations.Language
import org.jetbrains.annotations.ApiStatus
import org.jetbrains.jps.model.module.JpsModuleSourceRootType
import org.jetbrains.jps.util.JpsPathUtil
import org.jetbrains.kotlin.config.ExternalSystemTestRunTask
@@ -1,4 +1,4 @@
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package org.jetbrains.kotlin.idea.codeInsight.gradle
import org.gradle.util.GradleVersion
@@ -1,4 +1,4 @@
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package org.jetbrains.kotlin.idea.codeInsight.gradle
import org.junit.runners.model.MultipleFailureException

Some files were not shown because too many files have changed in this diff Show More