[uast] refactoring: extract base test classes and test utilities to a separate intellij.platform.uast.testFramework module

This follows our naming convention and fixes a problem with production sources in *.tests module, which causes inconveniences during generation runtime module descriptors (IJPL-109).

GitOrigin-RevId: 35638e51a34f009bf327ecf8802cf5186ac220ce
This commit is contained in:
Nikolay Chashnikov
2023-04-13 09:21:27 +02:00
committed by intellij-monorepo-bot
parent 6bb194f242
commit 1fdf0c518e
26 changed files with 26 additions and 8 deletions

1
.idea/modules.xml generated
View File

@@ -920,6 +920,7 @@
<module fileurl="file://$PROJECT_DIR$/platform/tracing/intellij.platform.tracing.rt.iml" filepath="$PROJECT_DIR$/platform/tracing/intellij.platform.tracing.rt.iml" />
<module fileurl="file://$PROJECT_DIR$/uast/uast-common/intellij.platform.uast.iml" filepath="$PROJECT_DIR$/uast/uast-common/intellij.platform.uast.iml" />
<module fileurl="file://$PROJECT_DIR$/uast/uast-common-ide/intellij.platform.uast.ide.iml" filepath="$PROJECT_DIR$/uast/uast-common-ide/intellij.platform.uast.ide.iml" />
<module fileurl="file://$PROJECT_DIR$/uast/testFramework/intellij.platform.uast.testFramework.iml" filepath="$PROJECT_DIR$/uast/testFramework/intellij.platform.uast.testFramework.iml" />
<module fileurl="file://$PROJECT_DIR$/uast/uast-tests/intellij.platform.uast.tests.iml" filepath="$PROJECT_DIR$/uast/uast-tests/intellij.platform.uast.tests.iml" />
<module fileurl="file://$PROJECT_DIR$/updater/intellij.platform.updater.iml" filepath="$PROJECT_DIR$/updater/intellij.platform.updater.iml" />
<module fileurl="file://$PROJECT_DIR$/platform/usageView/intellij.platform.usageView.iml" filepath="$PROJECT_DIR$/platform/usageView/intellij.platform.usageView.iml" />

View File

@@ -197,6 +197,7 @@
<orderEntry type="module" module-name="intellij.smart.update" scope="RUNTIME" />
<orderEntry type="module" module-name="intellij.gradle.analysis" scope="RUNTIME" />
<orderEntry type="module" module-name="intellij.html.tools" scope="RUNTIME" />
<orderEntry type="module" module-name="intellij.platform.uast.tests" scope="TEST" />
<orderEntry type="module" module-name="intellij.platform.runtime.repository.tests" scope="TEST" />
<orderEntry type="module" module-name="intellij.html.tools.tests" scope="TEST" />
<orderEntry type="module" module-name="intellij.lombok" scope="TEST" />

View File

@@ -63,7 +63,6 @@
<orderEntry type="module" module-name="intellij.jvm.analysis.impl" scope="TEST" />
<orderEntry type="module" module-name="intellij.jvm.analysis.java.tests" scope="TEST" />
<orderEntry type="module" module-name="intellij.platform.lvcs.impl" scope="TEST" />
<orderEntry type="module" module-name="intellij.platform.uast.tests" scope="TEST" />
<orderEntry type="module" module-name="intellij.java.coverage" exported="" />
<orderEntry type="module" module-name="intellij.platform.workspaceModel.jps" scope="TEST" />
<orderEntry type="library" scope="TEST" name="jackson" level="project" />

View File

@@ -147,7 +147,7 @@ abstract class BaseIdeaProperties : ProductProperties() {
"intellij.platform.testFramework.common",
"intellij.platform.testFramework.junit5",
"intellij.platform.testFramework",
"intellij.platform.uast.tests",
"intellij.platform.uast.testFramework",
"intellij.tools.testsBootstrap",
)) {
if (!productLayout.productApiModules.contains(moduleName) && !productLayout.productImplementationModules.contains(moduleName)) {

View File

@@ -37,7 +37,7 @@ private val nonPathAttributes = hashSetOf(
private val pathElements = hashSetOf("interface-class", "implementation-class")
private val predefinedTypes = hashSetOf("java.lang.Object")
private val ignoreModules = hashSetOf("intellij.java.testFramework", "intellij.platform.uast.tests")
private val ignoreModules = hashSetOf("intellij.java.testFramework", "intellij.platform.uast.testFramework")
class ModuleStructureValidator(private val context: BuildContext, modules: Collection<ModuleItem>) {
// filter out jars with relative paths in name

View File

@@ -10,7 +10,7 @@
<orderEntry type="module" module-name="intellij.java" scope="TEST" />
<orderEntry type="module" module-name="intellij.platform.lang" scope="TEST" />
<orderEntry type="module" module-name="intellij.groovy.psi" scope="TEST" />
<orderEntry type="module" module-name="intellij.platform.uast.tests" scope="TEST" />
<orderEntry type="module" module-name="intellij.platform.uast.testFramework" scope="TEST" />
<orderEntry type="module" module-name="intellij.platform.testFramework" scope="TEST" />
<orderEntry type="module" module-name="intellij.java.testFramework" scope="TEST" />
</component>

View File

@@ -14,7 +14,7 @@
<orderEntry type="library" scope="TEST" name="kotlin-test" level="project" />
<orderEntry type="module" module-name="intellij.platform.uast" />
<orderEntry type="module" module-name="intellij.java.rt" scope="TEST" />
<orderEntry type="module" module-name="intellij.platform.uast.tests" scope="TEST" />
<orderEntry type="module" module-name="intellij.platform.uast.testFramework" scope="TEST" />
<orderEntry type="module" module-name="kotlin.tests-common" scope="TEST" />
<orderEntry type="module" module-name="kotlin.test-framework" scope="TEST" />
<orderEntry type="library" scope="TEST" name="kotlinc.kotlin-compiler-cli" level="project" />

View File

@@ -18,7 +18,7 @@
<orderEntry type="module" module-name="intellij.platform.core.impl" />
<orderEntry type="module" module-name="intellij.platform.projectModel" />
<orderEntry type="module" module-name="intellij.platform.uast" />
<orderEntry type="module" module-name="intellij.platform.uast.tests" scope="TEST" />
<orderEntry type="module" module-name="intellij.platform.uast.testFramework" scope="TEST" />
<orderEntry type="module" module-name="kotlin.uast.uast-kotlin" />
<orderEntry type="module" module-name="kotlin.uast.uast-kotlin.tests" />
<orderEntry type="module" module-name="kotlin.test-framework" scope="TEST" />

View File

@@ -29,7 +29,7 @@
<orderEntry type="module" module-name="kotlin.tests-common" scope="TEST" />
<orderEntry type="module" module-name="kotlin.test-framework" scope="TEST" />
<orderEntry type="module" module-name="intellij.platform.uast" />
<orderEntry type="module" module-name="intellij.platform.uast.tests" scope="TEST" />
<orderEntry type="module" module-name="intellij.platform.uast.testFramework" scope="TEST" />
<orderEntry type="module" module-name="intellij.java.psi.impl" />
<orderEntry type="module" module-name="intellij.java.uast" />
<orderEntry type="module" module-name="intellij.groovy.uast.tests" scope="TEST" />

View File

@@ -0,0 +1,17 @@
<?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$/src" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module" module-name="intellij.platform.uast" exported="" />
<orderEntry type="module" module-name="intellij.platform.testFramework" />
<orderEntry type="library" name="kotlin-stdlib" level="project" />
<orderEntry type="module" module-name="intellij.java.testFramework" />
<orderEntry type="module" module-name="intellij.platform.vcs.impl" />
<orderEntry type="module" module-name="intellij.java.uast" />
</component>
</module>

View File

@@ -3,7 +3,6 @@
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/test" isTestSource="true" />
</content>
<orderEntry type="inheritedJdk" />
@@ -16,6 +15,7 @@
<orderEntry type="module" module-name="intellij.java.rt" />
<orderEntry type="module" module-name="intellij.java.psi.impl" />
<orderEntry type="module" module-name="intellij.platform.testFramework" />
<orderEntry type="module" module-name="intellij.platform.uast.testFramework" exported="" scope="TEST" />
<orderEntry type="module" module-name="intellij.java.tests" scope="RUNTIME" />
<orderEntry type="module" module-name="intellij.java.testFramework" />
<orderEntry type="module" module-name="intellij.platform.vcs.impl" />