Skip to content

Commit f96af88

Browse files
committed
Make the testRuntimeClasspath configuration request instrumented and composed jars of imported modules when running tests
1 parent 7870c4c commit f96af88

File tree

6 files changed

+7
-1
lines changed

6 files changed

+7
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
### Fixed
1515

16+
- Make the `testRuntimeClasspath` configuration request instrumented and composed jars of imported modules when running tests
1617
- Adjust local artifact definition in Ivy XML files to satisfy Gradle dependency locking. [#1778](../../issues/1778)
1718
- Add the missing `org.jetbrains.kotlin.platform.type=jvm` attribute to the `intellijPlatformRuntimeClasspath` configuration manually as it is not inherited from the `runtimeClasspath`.
1819
- `Could not generate a decorated class for type PluginArtifactRepository.` when creating a custom plugin repository.

api/IntelliJPlatformGradlePlugin.api

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ public final class org/jetbrains/intellij/platform/gradle/Constants$Configuratio
9797
public static final field TEST_FIXTURES_COMPILE_CLASSPATH Ljava/lang/String;
9898
public static final field TEST_FIXTURES_COMPILE_ONLY Ljava/lang/String;
9999
public static final field TEST_IMPLEMENTATION Ljava/lang/String;
100+
public static final field TEST_RUNTIME_CLASSPATH Ljava/lang/String;
100101
}
101102

102103
public final class org/jetbrains/intellij/platform/gradle/Constants$Constraints {

src/main/kotlin/org/jetbrains/intellij/platform/gradle/Constants.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ object Constants {
139139
const val TEST_COMPILE_CLASSPATH = JvmConstants.TEST_COMPILE_CLASSPATH_CONFIGURATION_NAME
140140
const val TEST_COMPILE_ONLY = JvmConstants.TEST_COMPILE_ONLY_CONFIGURATION_NAME
141141
const val TEST_IMPLEMENTATION = JvmConstants.TEST_IMPLEMENTATION_CONFIGURATION_NAME
142+
const val TEST_RUNTIME_CLASSPATH = JvmConstants.TEST_RUNTIME_CLASSPATH_CONFIGURATION_NAME
142143
const val TEST_FIXTURES_COMPILE_ONLY = "testFixturesCompileOnly"
143144
const val TEST_FIXTURES_COMPILE_CLASSPATH = "testFixturesCompileClasspath"
144145
}

src/main/kotlin/org/jetbrains/intellij/platform/gradle/plugins/project/IntelliJPlatformBasePlugin.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,7 @@ abstract class IntelliJPlatformBasePlugin : Plugin<Project> {
351351
project.configurations[Configurations.External.COMPILE_CLASSPATH],
352352
project.configurations[Configurations.External.RUNTIME_CLASSPATH],
353353
project.configurations[Configurations.External.TEST_COMPILE_CLASSPATH],
354+
project.configurations[Configurations.External.TEST_RUNTIME_CLASSPATH],
354355
project.configurations[Configurations.INTELLIJ_PLATFORM_CLASSPATH],
355356
project.configurations[Configurations.INTELLIJ_PLATFORM_TEST_CLASSPATH],
356357
).forEach {

src/main/kotlin/org/jetbrains/intellij/platform/gradle/plugins/project/IntelliJPlatformModulePlugin.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ abstract class IntelliJPlatformModulePlugin : Plugin<Project> {
152152
Configurations.INTELLIJ_PLATFORM_RUNTIME_CLASSPATH,
153153
Configurations.External.COMPILE_CLASSPATH,
154154
Configurations.External.TEST_COMPILE_CLASSPATH,
155+
Configurations.External.TEST_RUNTIME_CLASSPATH,
155156
// TODO: required for test fixtures?
156157
// Configurations.External.TEST_FIXTURES_COMPILE_CLASSPATH,
157158
Configurations.INTELLIJ_PLATFORM_PLUGIN_MODULE,

src/main/kotlin/org/jetbrains/intellij/platform/gradle/tasks/TestIdeTask.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,8 @@ abstract class TestIdeTask : Test(), TestableAware, IntelliJPlatformVersionAware
104104
.toSet()
105105
})
106106

107-
classpath = instrumentedCode + instrumentedTestCode + classpath + intellijPlatformTestClasspathConfiguration + productModules
107+
classpath = classpath + intellijPlatformTestClasspathConfiguration + productModules
108+
108109
testClassesDirs = instrumentedTestCode + testClassesDirs
109110
javaLauncher = sourceTask.runtimeDirectory.zip(sourceTask.runtimeMetadata) { directory, metadata ->
110111
IntelliJPlatformJavaLauncher(directory, metadata)

0 commit comments

Comments
 (0)