From 6959f6af758d83e8f584c2f75580d49c29505626 Mon Sep 17 00:00:00 2001 From: Vyacheslav Gerasimov Date: Wed, 7 Feb 2018 14:05:45 +0300 Subject: [PATCH] Exclude lib subdirs from inlellij module When lib/rt is added to test runtime some tests break --- .../intellij-sdk/build.gradle.kts | 20 +++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/buildSrc/prepare-deps/intellij-sdk/build.gradle.kts b/buildSrc/prepare-deps/intellij-sdk/build.gradle.kts index 488c9eec05b..9a08c51fe04 100644 --- a/buildSrc/prepare-deps/intellij-sdk/build.gradle.kts +++ b/buildSrc/prepare-deps/intellij-sdk/build.gradle.kts @@ -193,9 +193,13 @@ val prepareIvyXmls by tasks.creating { val sourcesFile = if (sources.isEmpty) null else File(repoDir, "${sources.name}/${sources.singleFile.name}") if (installIntellijCommunity) { - writeIvyXml(intellij.name, intellij.name, - files("$intellijSdkDir/lib/").filter { !it.name.startsWith("kotlin-") }, - File(intellijSdkDir, "lib"), + val libDir = File(intellijSdkDir, "lib") + writeIvyXml(intellij.name, + intellij.name, + fileTree(libDir).filter { + it.parentFile == libDir && !it.name.startsWith("kotlin-") + }, + libDir, sourcesFile) File(intellijSdkDir, "plugins").listFiles { it: File -> it.isDirectory }.forEach { @@ -204,9 +208,13 @@ val prepareIvyXmls by tasks.creating { } if (installIntellijUltimate) { - writeIvyXml(intellij.name /* important! the module name should be "intellij" */ , intellijUltimate.name, - files("$intellijUltimateSdkDir/lib/").filter { !it.name.startsWith("kotlin-") }, - File(intellijUltimateSdkDir, "lib"), + val libDir = File(intellijUltimateSdkDir, "lib") + writeIvyXml(intellij.name, // important! the module name should be "intellij" + intellijUltimate.name, + fileTree(libDir).filter { + it.parentFile == libDir && !it.name.startsWith("kotlin-") + }, + libDir, sourcesFile) File(intellijUltimateSdkDir, "plugins").listFiles { it: File -> it.isDirectory }.forEach {