Skip to content

Commit

Permalink
Make the testRuntimeClasspath configuration request instrumented an…
Browse files Browse the repository at this point in the history
…d composed jars of imported modules when running tests
  • Loading branch information
hsz committed Oct 29, 2024
1 parent 7870c4c commit f96af88
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

### Fixed

- Make the `testRuntimeClasspath` configuration request instrumented and composed jars of imported modules when running tests
- Adjust local artifact definition in Ivy XML files to satisfy Gradle dependency locking. [#1778](../../issues/1778)
- Add the missing `org.jetbrains.kotlin.platform.type=jvm` attribute to the `intellijPlatformRuntimeClasspath` configuration manually as it is not inherited from the `runtimeClasspath`.
- `Could not generate a decorated class for type PluginArtifactRepository.` when creating a custom plugin repository.
Expand Down
1 change: 1 addition & 0 deletions api/IntelliJPlatformGradlePlugin.api
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ public final class org/jetbrains/intellij/platform/gradle/Constants$Configuratio
public static final field TEST_FIXTURES_COMPILE_CLASSPATH Ljava/lang/String;
public static final field TEST_FIXTURES_COMPILE_ONLY Ljava/lang/String;
public static final field TEST_IMPLEMENTATION Ljava/lang/String;
public static final field TEST_RUNTIME_CLASSPATH Ljava/lang/String;
}

public final class org/jetbrains/intellij/platform/gradle/Constants$Constraints {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ object Constants {
const val TEST_COMPILE_CLASSPATH = JvmConstants.TEST_COMPILE_CLASSPATH_CONFIGURATION_NAME
const val TEST_COMPILE_ONLY = JvmConstants.TEST_COMPILE_ONLY_CONFIGURATION_NAME
const val TEST_IMPLEMENTATION = JvmConstants.TEST_IMPLEMENTATION_CONFIGURATION_NAME
const val TEST_RUNTIME_CLASSPATH = JvmConstants.TEST_RUNTIME_CLASSPATH_CONFIGURATION_NAME
const val TEST_FIXTURES_COMPILE_ONLY = "testFixturesCompileOnly"
const val TEST_FIXTURES_COMPILE_CLASSPATH = "testFixturesCompileClasspath"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,7 @@ abstract class IntelliJPlatformBasePlugin : Plugin<Project> {
project.configurations[Configurations.External.COMPILE_CLASSPATH],
project.configurations[Configurations.External.RUNTIME_CLASSPATH],
project.configurations[Configurations.External.TEST_COMPILE_CLASSPATH],
project.configurations[Configurations.External.TEST_RUNTIME_CLASSPATH],
project.configurations[Configurations.INTELLIJ_PLATFORM_CLASSPATH],
project.configurations[Configurations.INTELLIJ_PLATFORM_TEST_CLASSPATH],
).forEach {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ abstract class IntelliJPlatformModulePlugin : Plugin<Project> {
Configurations.INTELLIJ_PLATFORM_RUNTIME_CLASSPATH,
Configurations.External.COMPILE_CLASSPATH,
Configurations.External.TEST_COMPILE_CLASSPATH,
Configurations.External.TEST_RUNTIME_CLASSPATH,
// TODO: required for test fixtures?
// Configurations.External.TEST_FIXTURES_COMPILE_CLASSPATH,
Configurations.INTELLIJ_PLATFORM_PLUGIN_MODULE,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,8 @@ abstract class TestIdeTask : Test(), TestableAware, IntelliJPlatformVersionAware
.toSet()
})

classpath = instrumentedCode + instrumentedTestCode + classpath + intellijPlatformTestClasspathConfiguration + productModules
classpath = classpath + intellijPlatformTestClasspathConfiguration + productModules

testClassesDirs = instrumentedTestCode + testClassesDirs
javaLauncher = sourceTask.runtimeDirectory.zip(sourceTask.runtimeMetadata) { directory, metadata ->
IntelliJPlatformJavaLauncher(directory, metadata)
Expand Down

0 comments on commit f96af88

Please sign in to comment.