Build: fix PILL for JPS build.

This commit is contained in:
Sergey Rostov
2019-01-28 12:45:18 +03:00
parent 30cc70d4c3
commit f5b7b5990f
13 changed files with 31 additions and 21 deletions
+1
View File
@@ -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
+13 -4
View File
@@ -151,7 +151,8 @@ class JpsCompatiblePlugin : Plugin<Project> {
val files = render(jpsProject)
removeExistingIdeaLibrariesAndModules()
removeJpsRunConfigurations()
removeJpsAndPillRunConfigurations()
removeAllArtifactConfigurations()
copyRunConfigurations()
setOptionsForDefaultJunitRunConfiguration(rootProject)
@@ -163,7 +164,8 @@ class JpsCompatiblePlugin : Plugin<Project> {
initEnvironment(project)
removeExistingIdeaLibrariesAndModules()
removeJpsRunConfigurations()
removeJpsAndPillRunConfigurations()
removeAllArtifactConfigurations()
}
private fun removeExistingIdeaLibrariesAndModules() {
@@ -171,10 +173,17 @@ class JpsCompatiblePlugin : Plugin<Project> {
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() }
}
@@ -1,8 +0,0 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="[JPS] All Compiler Tests" type="CompoundRunConfigurationType" factoryName="Compound Run Configuration">
<toRun type="JUnit" name="[JPS] Compiler Tests" />
<toRun type="JUnit" name="[JPS] JS Backend Tests" />
<toRun type="JUnit" name="[JPS] Java 8 Tests" />
<method />
</configuration>
</component>
@@ -0,0 +1,8 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="[PILL] All Compiler Tests" type="CompoundRunConfigurationType" factoryName="Compound Run Configuration">
<toRun type="JUnit" name="[PILL] Compiler Tests" />
<toRun type="JUnit" name="[PILL] JS Backend Tests" />
<toRun type="JUnit" name="[PILL] Java 8 Tests" />
<method />
</configuration>
</component>
@@ -1,5 +1,5 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="[JPS] All IDEA Plugin Tests" type="JUnit" factoryName="JUnit">
<configuration default="false" name="[PILL] All IDEA Plugin Tests" type="JUnit" factoryName="JUnit">
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea">
<pattern>
<option name="PATTERN" value="org.jetbrains.kotlin.*" />
@@ -1,5 +1,5 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="[JPS] Compiler Tests" type="JUnit" factoryName="JUnit">
<configuration default="false" name="[PILL] Compiler Tests" type="JUnit" factoryName="JUnit">
<module name="compiler.test" />
<extension name="coverage">
<pattern>
@@ -1,5 +1,5 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="[JPS] Generate All Tests" type="Application" factoryName="Application">
<configuration default="false" name="[PILL] Generate All Tests" type="Application" factoryName="Application">
<option name="MAIN_CLASS_NAME" value="org.jetbrains.kotlin.pill.generateAllTests.Main" />
<module name="generate-all-tests.test" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
@@ -1,5 +1,5 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="[JPS] IDEA" type="Application" factoryName="Application" singleton="true">
<configuration default="false" name="[PILL] IDEA" type="Application" factoryName="Application" singleton="true">
<log_file alias="idea.log" path="$PROJECT_DIR$/ideaSDK/system-idea/log/idea.log" />
<option name="MAIN_CLASS_NAME" value="com.intellij.idea.Main" />
<module name="idea-runner" />
@@ -1,5 +1,5 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="[JPS] IDEA (No ProcessCanceledException)" type="Application" factoryName="Application" singleton="true">
<configuration default="false" name="[PILL] IDEA (No ProcessCanceledException)" type="Application" factoryName="Application" singleton="true">
<log_file alias="idea.log" path="$PROJECT_DIR$/ideaSDK/system-idea/log/idea.log" />
<option name="MAIN_CLASS_NAME" value="com.intellij.idea.Main" />
<module name="idea-runner" />
@@ -1,5 +1,5 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="[JPS] JS Backend Tests" type="JUnit" factoryName="JUnit">
<configuration default="false" name="[PILL] JS Backend Tests" type="JUnit" factoryName="JUnit">
<module name="js.tests.test" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" />
@@ -1,5 +1,5 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="[JPS] JVM Backend Tests" type="JUnit" factoryName="JUnit">
<configuration default="false" name="[PILL] JVM Backend Tests" type="JUnit" factoryName="JUnit">
<module name="compiler.test" />
<extension name="coverage">
<pattern>
@@ -1,5 +1,5 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="[JPS] Java 8 Tests" type="JUnit" factoryName="JUnit">
<configuration default="false" name="[PILL] Java 8 Tests" type="JUnit" factoryName="JUnit">
<module name="tests-java8.test" />
<extension name="coverage">
<pattern>
@@ -1,5 +1,5 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="[JPS] Refresh JPS Model" type="GradleRunConfiguration" factoryName="Gradle" singleton="true">
<configuration default="false" name="[PILL] Refresh PILL Model" type="GradleRunConfiguration" factoryName="Gradle" singleton="true">
<ExternalSystemSettings>
<option name="executionName" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />