From f5b7b5990fb4dc28b61489e862ad1dd04cddc130 Mon Sep 17 00:00:00 2001 From: Sergey Rostov Date: Mon, 28 Jan 2019 12:45:18 +0300 Subject: [PATCH] Build: fix PILL for JPS build. --- .gitignore | 1 + buildSrc/src/main/kotlin/pill/plugin.kt | 17 +++++++++++++---- .../JPS_All_Compiler_Tests.xml | 8 -------- .../PILL_All_Compiler_Tests.xml | 8 ++++++++ ...Tests.xml => PILL_All_IDEA_Plugin_Tests.xml} | 2 +- ...mpiler_Tests.xml => PILL_Compiler_Tests.xml} | 2 +- ...ll_Tests.xml => PILL_Generate_All_Tests.xml} | 2 +- .../{JPS_IDEA.xml => PILL_IDEA.xml} | 2 +- ... PILL_IDEA_No_ProcessCancelledException.xml} | 2 +- ...kend_Tests.xml => PILL_JS_Backend_Tests.xml} | 2 +- ...end_Tests.xml => PILL_JVM_Backend_Tests.xml} | 2 +- ...S_Java_8_Tests.xml => PILL_Java_8_Tests.xml} | 2 +- ...JPS_Model.xml => PILL_Refresh_JPS_Model.xml} | 2 +- 13 files changed, 31 insertions(+), 21 deletions(-) delete mode 100644 buildSrc/src/main/resources/runConfigurations/JPS_All_Compiler_Tests.xml create mode 100644 buildSrc/src/main/resources/runConfigurations/PILL_All_Compiler_Tests.xml rename buildSrc/src/main/resources/runConfigurations/{JPS_All_IDEA_Plugin_Tests.xml => PILL_All_IDEA_Plugin_Tests.xml} (93%) rename buildSrc/src/main/resources/runConfigurations/{JPS_Compiler_Tests.xml => PILL_Compiler_Tests.xml} (93%) rename buildSrc/src/main/resources/runConfigurations/{JPS_Generate_All_Tests.xml => PILL_Generate_All_Tests.xml} (73%) rename buildSrc/src/main/resources/runConfigurations/{JPS_IDEA.xml => PILL_IDEA.xml} (94%) rename buildSrc/src/main/resources/runConfigurations/{JPS_IDEA_No_ProcessCancelledException.xml => PILL_IDEA_No_ProcessCancelledException.xml} (93%) rename buildSrc/src/main/resources/runConfigurations/{JPS_JS_Backend_Tests.xml => PILL_JS_Backend_Tests.xml} (92%) rename buildSrc/src/main/resources/runConfigurations/{JPS_JVM_Backend_Tests.xml => PILL_JVM_Backend_Tests.xml} (93%) rename buildSrc/src/main/resources/runConfigurations/{JPS_Java_8_Tests.xml => PILL_Java_8_Tests.xml} (92%) rename buildSrc/src/main/resources/runConfigurations/{JPS_Refresh_JPS_Model.xml => PILL_Refresh_JPS_Model.xml} (83%) diff --git a/.gitignore b/.gitignore index b252dc3cb71..812a913a1f6 100644 --- a/.gitignore +++ b/.gitignore @@ -32,6 +32,7 @@ build/ .idea/artifacts/PILL_*.xml .idea/modules .idea/runConfigurations/JPS_*.xml +.idea/runConfigurations/PILL_*.xml .idea/libraries .idea/modules.xml .idea/gradle.xml diff --git a/buildSrc/src/main/kotlin/pill/plugin.kt b/buildSrc/src/main/kotlin/pill/plugin.kt index 351d850d282..cb160742e15 100644 --- a/buildSrc/src/main/kotlin/pill/plugin.kt +++ b/buildSrc/src/main/kotlin/pill/plugin.kt @@ -151,7 +151,8 @@ class JpsCompatiblePlugin : Plugin { val files = render(jpsProject) removeExistingIdeaLibrariesAndModules() - removeJpsRunConfigurations() + removeJpsAndPillRunConfigurations() + removeAllArtifactConfigurations() copyRunConfigurations() setOptionsForDefaultJunitRunConfiguration(rootProject) @@ -163,7 +164,8 @@ class JpsCompatiblePlugin : Plugin { initEnvironment(project) removeExistingIdeaLibrariesAndModules() - removeJpsRunConfigurations() + removeJpsAndPillRunConfigurations() + removeAllArtifactConfigurations() } private fun removeExistingIdeaLibrariesAndModules() { @@ -171,10 +173,17 @@ class JpsCompatiblePlugin : Plugin { File(projectDir, ".idea/modules").deleteRecursively() } - private fun removeJpsRunConfigurations() { + private fun removeJpsAndPillRunConfigurations() { File(projectDir, ".idea/runConfigurations") .walk() - .filter { it.name.startsWith("JPS_") && it.extension.toLowerCase() == "xml" } + .filter { (it.name.startsWith("JPS_") || it.name.startsWith("PILL_")) && it.extension.toLowerCase() == "xml" } + .forEach { it.delete() } + } + + private fun removeAllArtifactConfigurations() { + File(projectDir, ".idea/artifacts") + .walk() + .filter { it.extension.toLowerCase() == "xml" } .forEach { it.delete() } } diff --git a/buildSrc/src/main/resources/runConfigurations/JPS_All_Compiler_Tests.xml b/buildSrc/src/main/resources/runConfigurations/JPS_All_Compiler_Tests.xml deleted file mode 100644 index e6eb48f501b..00000000000 --- a/buildSrc/src/main/resources/runConfigurations/JPS_All_Compiler_Tests.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/buildSrc/src/main/resources/runConfigurations/PILL_All_Compiler_Tests.xml b/buildSrc/src/main/resources/runConfigurations/PILL_All_Compiler_Tests.xml new file mode 100644 index 00000000000..48a042bab57 --- /dev/null +++ b/buildSrc/src/main/resources/runConfigurations/PILL_All_Compiler_Tests.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/buildSrc/src/main/resources/runConfigurations/JPS_All_IDEA_Plugin_Tests.xml b/buildSrc/src/main/resources/runConfigurations/PILL_All_IDEA_Plugin_Tests.xml similarity index 93% rename from buildSrc/src/main/resources/runConfigurations/JPS_All_IDEA_Plugin_Tests.xml rename to buildSrc/src/main/resources/runConfigurations/PILL_All_IDEA_Plugin_Tests.xml index f56fbf23aa9..d58bc15a04b 100644 --- a/buildSrc/src/main/resources/runConfigurations/JPS_All_IDEA_Plugin_Tests.xml +++ b/buildSrc/src/main/resources/runConfigurations/PILL_All_IDEA_Plugin_Tests.xml @@ -1,5 +1,5 @@ - +