mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[build scripts] add JARs from lib/modules/ subdirectory of a plugin directory to classpath when running tests
JAR for a content module can be placed under lib/modules/ directory if the package prefix isn't specified for it. So we need to add such JARs to the list returned from 'createIdeClassPath', otherwise Rider tests fail if some modules in YAML plugins are extracted to separate JARs (this is needed for IJPL-176102). GitOrigin-RevId: 22f0f57a6c927a6ca261b849dc3428851bbaef07
This commit is contained in:
committed by
intellij-monorepo-bot
parent
85764debe9
commit
54d4ff269b
+3
-2
@@ -1231,8 +1231,9 @@ suspend fun createIdeClassPath(platformLayout: PlatformLayout, context: BuildCon
|
||||
val pluginDir = context.paths.distAllDir.resolve(PLUGINS_DIRECTORY)
|
||||
for (entry in contentReport.bundledPlugins.flatMap { it.second }) {
|
||||
val relativePath = pluginDir.relativize(entry.path)
|
||||
// for plugins, our classloader load JARs only from the "lib/" directory
|
||||
if (relativePath.nameCount != 3 || relativePath.getName(1).toString() != LIB_DIRECTORY) {
|
||||
// for plugins, our classloaders load JARs only from the "lib/" and "lib/modules/" directories
|
||||
if (!(relativePath.nameCount in 3..4 && relativePath.getName(1).toString() == LIB_DIRECTORY &&
|
||||
(relativePath.nameCount == 3 || relativePath.getName(2).toString() == "modules"))) {
|
||||
continue
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user