changeset 51266:f8696e0ab9b7 jdk-12+5

8208524: IntelliJ support broken since 2018.2 Summary: Move build.xml out of .idea folder Reviewed-by: stuefe
author mcimadamore
date Tue, 31 Jul 2018 16:49:51 +0100
parents 8329bfbe1b30
children 2cd8bbccbd2d
files bin/idea.sh make/idea/template/ant.xml make/idea/template/build.xml make/idea/template/misc.xml make/langtools/build.xml make/langtools/intellij/ant.xml make/langtools/intellij/build.xml make/langtools/intellij/misc.xml
diffstat 8 files changed, 21 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/bin/idea.sh	Tue Jul 31 09:55:09 2018 -0400
+++ b/bin/idea.sh	Tue Jul 31 16:49:51 2018 +0100
@@ -68,9 +68,12 @@
 cd $IDEA_OUTPUT; IDEA_OUTPUT=`pwd`
 
 MAKE_DIR="$SCRIPT_DIR/../make"
+SUPPORT_DIR="$SCRIPT_DIR/../build/.idea-support"
 IDEA_MAKE="$MAKE_DIR/idea"
 IDEA_TEMPLATE="$IDEA_MAKE/template"
 
+mkdir -p $SUPPORT_DIR
+
 cp -r "$IDEA_TEMPLATE"/* "$IDEA_OUTPUT"
 
 #init template variables
@@ -124,6 +127,11 @@
   echo "FATAL: SPEC is empty" >&2; exit 1
 fi
 
+# move build.xml out of .idea, see IDEA-189915
+IDEA_BUILD_OLD=$IDEA_BUILD
+IDEA_BUILD=$SUPPORT_DIR/build.xml
+mv $IDEA_BUILD_OLD $IDEA_BUILD
+
 SOURCE_FOLDER="      <sourceFolder url=\"file://\$MODULE_DIR\$/####\" isTestSource=\"false\" />"
 SOURCE_FOLDERS_DONE="false"
 
--- a/make/idea/template/ant.xml	Tue Jul 31 09:55:09 2018 -0400
+++ b/make/idea/template/ant.xml	Tue Jul 31 16:49:51 2018 +0100
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <project version="4">
   <component name="AntConfiguration">
-    <buildFile url="file://$PROJECT_DIR$/.idea/build.xml">
+    <buildFile url="file://$PROJECT_DIR$/build/.idea-support/build.xml">
       <properties>
         <property name="intellij.ismake" value="$IsMake$" />
         <property name="build.target.dir" value="specDir" /> <!-- this will be replaced -->
--- a/make/idea/template/build.xml	Tue Jul 31 09:55:09 2018 -0400
+++ b/make/idea/template/build.xml	Tue Jul 31 16:49:51 2018 +0100
@@ -1,5 +1,5 @@
 <!-- importing.xml -->
-<project name="jdk" basedir="..">
+<project name="jdk" basedir="../..">
 
     <script language="javascript" classpath=".idea/classes">
         var JdkLogger = Java.type("idea.JdkIdeaAntLogger");
--- a/make/idea/template/misc.xml	Tue Jul 31 09:55:09 2018 -0400
+++ b/make/idea/template/misc.xml	Tue Jul 31 16:49:51 2018 +0100
@@ -9,10 +9,10 @@
     <jre alt="true" value="images_jdk" /> <!-- this will be replaced -->
     <options></options>
     <ant>
-      <target file="file://$PROJECT_DIR$/.idea/build.xml" name="images" />
+      <target file="file://$PROJECT_DIR$/build/.idea-support/build.xml" name="images" />
     </ant>
   </component>
   <component name="ProjectRootManager" version="2" languageLevel="JDK_1_9" assert-keyword="true" jdk-15="true">
-    <output url="file://$PROJECT_DIR$/build/idea/out" />
+    <output url="file://$PROJECT_DIR$/build/.idea-support/out" />
   </component>
 </project>
--- a/make/langtools/build.xml	Tue Jul 31 09:55:09 2018 -0400
+++ b/make/langtools/build.xml	Tue Jul 31 16:49:51 2018 +0100
@@ -76,6 +76,7 @@
     <property name="make.conf.dir" location="${make.dir}/conf"/>
     <property name="make.tools.dir" location="${make.dir}/tools"/>
     <property name="build.dir" location="build/langtools"/>
+    <property name="idea.support.dir" location="build/.idea-support"/>
     <property name="build.modules" location="${build.dir}/modules"/>
     <property name="build.gensrc" location="${build.dir}/gensrc"/>
     <property name="build.tools" location="${build.dir}/toolclasses"/>
@@ -274,6 +275,9 @@
                <exclude name="**/utils/**"/>
             </fileset>
         </copy>
+        <!-- move build.xml out of .idea, see IDEA-189915 -->
+        <mkdir dir="${idea.support.dir}"/>
+        <move todir="${idea.support.dir}" file=".idea/build.xml"/>
         <condition property="idea.jtreg.home" value="${jtreg.home}" else = "[jtreg.home]">
             <isset property="jtreg.home"/>
         </condition>
--- a/make/langtools/intellij/ant.xml	Tue Jul 31 09:55:09 2018 -0400
+++ b/make/langtools/intellij/ant.xml	Tue Jul 31 16:49:51 2018 +0100
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <project version="4">
   <component name="AntConfiguration">
-    <buildFile url="file://$PROJECT_DIR$/.idea/build.xml">
+    <buildFile url="file://$PROJECT_DIR$/build/.idea-support/build.xml">
       <properties>
 	    <property name="langtools.jdk.home" value="@IDEA_TARGET_JDK@" />
         <property name="intellij.ismake" value="$IsMake$" />
--- a/make/langtools/intellij/build.xml	Tue Jul 31 09:55:09 2018 -0400
+++ b/make/langtools/intellij/build.xml	Tue Jul 31 16:49:51 2018 +0100
@@ -1,12 +1,12 @@
 <!-- importing.xml -->
-<project name="langtools" basedir="..">
+<project name="langtools" basedir="../..">
 
     <script language="javascript" classpath=".idea/classes">
         var LangtoolsLogger = Java.type("idea.LangtoolsIdeaAntLogger");
         new LangtoolsLogger(project)
     </script>
 
-    <import file="../make/langtools/build.xml"/>
+    <import file="../../make/langtools/build.xml"/>
 
     <target name="cond-clean" unless="${intellij.ismake}">
         <antcall target="clean"/>
--- a/make/langtools/intellij/misc.xml	Tue Jul 31 09:55:09 2018 -0400
+++ b/make/langtools/intellij/misc.xml	Tue Jul 31 16:49:51 2018 +0100
@@ -9,12 +9,10 @@
     <jre alt="true" value="@IDEA_TARGET_JDK@" />
     <options>@XPATCH@</options>
     <ant>
-      <target file="file://$PROJECT_DIR$/.idea/build.xml" name="build-all-classes" />
+      <target file="file://$PROJECT_DIR$/build/.idea-support/build.xml" name="build-all-classes" />
     </ant>
   </component>
   <component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" assert-keyword="true" jdk-15="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
-    <output url="file://$PROJECT_DIR$/.idea/out" />
+    <output url="file://$PROJECT_DIR$/build/.idea-support/out" />
   </component>
 </project>
-
-