Move the compiler.xml back to IDEA (this fixes almost all IDE tests when running on JPS)

This commit is contained in:
Yan Zhulanow
2018-02-14 23:55:16 +03:00
parent 34d1611ed4
commit 8dad2d30f5
4 changed files with 6 additions and 6 deletions
+5
View File
@@ -94,6 +94,11 @@ sourceSets {
} }
} }
val jar: Jar by tasks
jar.from("../idea/src") {
include("META-INF/extensions/compiler.xml")
}
projectTest { projectTest {
dependsOn(*testDistProjects.map { "$it:dist" }.toTypedArray()) dependsOn(*testDistProjects.map { "$it:dist" }.toTypedArray())
workingDir = rootDir workingDir = rootDir
@@ -526,7 +526,7 @@ class KotlinCoreEnvironment private constructor(
?: configuration.get(CLIConfigurationKeys.COMPILER_JAR_LOCATOR)?.compilerJar ?: configuration.get(CLIConfigurationKeys.COMPILER_JAR_LOCATOR)?.compilerJar
?: PathUtil.getResourcePathForClass(this::class.java).takeIf { it.hasConfigFile(configFilePath) } ?: PathUtil.getResourcePathForClass(this::class.java).takeIf { it.hasConfigFile(configFilePath) }
// hack for load extensions when compiler run directly from project directory (e.g. in tests) // hack for load extensions when compiler run directly from project directory (e.g. in tests)
?: File("compiler/cli/src").takeIf { it.hasConfigFile(configFilePath) } ?: File("idea/src").takeIf { it.hasConfigFile(configFilePath) }
?: throw IllegalStateException( ?: throw IllegalStateException(
"Unable to find extension point configuration $configFilePath " + "Unable to find extension point configuration $configFilePath " +
"(cp:\n ${(Thread.currentThread().contextClassLoader as? UrlClassLoader)?.urls?.joinToString("\n ") { it.file }})") "(cp:\n ${(Thread.currentThread().contextClassLoader as? UrlClassLoader)?.urls?.joinToString("\n ") { it.file }})")
-5
View File
@@ -97,11 +97,6 @@ dependencies {
testRuntime(intellijPluginDep("testng")) testRuntime(intellijPluginDep("testng"))
} }
val processResources: Copy by tasks
processResources.from("../compiler/cli/src") {
include("META-INF/extensions/compiler.xml")
}
sourceSets { sourceSets {
"main" { "main" {
projectDefault() projectDefault()