Skip to content

Commit 9d25c65

Browse files
committed
8208524: IntelliJ support broken since 2018.2
Move build.xml out of .idea folder Reviewed-by: stuefe
1 parent 7d04a31 commit 9d25c65

8 files changed

Lines changed: 21 additions & 11 deletions

File tree

bin/idea.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,12 @@ mkdir $IDEA_OUTPUT || exit 1
6868
cd $IDEA_OUTPUT; IDEA_OUTPUT=`pwd`
6969

7070
MAKE_DIR="$SCRIPT_DIR/../make"
71+
SUPPORT_DIR="$SCRIPT_DIR/../build/.idea-support"
7172
IDEA_MAKE="$MAKE_DIR/idea"
7273
IDEA_TEMPLATE="$IDEA_MAKE/template"
7374

75+
mkdir -p $SUPPORT_DIR
76+
7477
cp -r "$IDEA_TEMPLATE"/* "$IDEA_OUTPUT"
7578

7679
#init template variables
@@ -124,6 +127,11 @@ if [ "x$SPEC" = "x" ] ; then
124127
echo "FATAL: SPEC is empty" >&2; exit 1
125128
fi
126129

130+
# move build.xml out of .idea, see IDEA-189915
131+
IDEA_BUILD_OLD=$IDEA_BUILD
132+
IDEA_BUILD=$SUPPORT_DIR/build.xml
133+
mv $IDEA_BUILD_OLD $IDEA_BUILD
134+
127135
SOURCE_FOLDER=" <sourceFolder url=\"file://\$MODULE_DIR\$/####\" isTestSource=\"false\" />"
128136
SOURCE_FOLDERS_DONE="false"
129137

make/idea/template/ant.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<project version="4">
33
<component name="AntConfiguration">
4-
<buildFile url="file://$PROJECT_DIR$/.idea/build.xml">
4+
<buildFile url="file://$PROJECT_DIR$/build/.idea-support/build.xml">
55
<properties>
66
<property name="intellij.ismake" value="$IsMake$" />
77
<property name="build.target.dir" value="specDir" /> <!-- this will be replaced -->

make/idea/template/build.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!-- importing.xml -->
2-
<project name="jdk" basedir="..">
2+
<project name="jdk" basedir="../..">
33

44
<script language="javascript" classpath=".idea/classes">
55
var JdkLogger = Java.type("idea.JdkIdeaAntLogger");

make/idea/template/misc.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99
<jre alt="true" value="images_jdk" /> <!-- this will be replaced -->
1010
<options></options>
1111
<ant>
12-
<target file="file://$PROJECT_DIR$/.idea/build.xml" name="images" />
12+
<target file="file://$PROJECT_DIR$/build/.idea-support/build.xml" name="images" />
1313
</ant>
1414
</component>
1515
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_9" assert-keyword="true" jdk-15="true">
16-
<output url="file://$PROJECT_DIR$/build/idea/out" />
16+
<output url="file://$PROJECT_DIR$/build/.idea-support/out" />
1717
</component>
1818
</project>

make/langtools/build.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@
7676
<property name="make.conf.dir" location="${make.dir}/conf"/>
7777
<property name="make.tools.dir" location="${make.dir}/tools"/>
7878
<property name="build.dir" location="build/langtools"/>
79+
<property name="idea.support.dir" location="build/.idea-support"/>
7980
<property name="build.modules" location="${build.dir}/modules"/>
8081
<property name="build.gensrc" location="${build.dir}/gensrc"/>
8182
<property name="build.tools" location="${build.dir}/toolclasses"/>
@@ -274,6 +275,9 @@
274275
<exclude name="**/utils/**"/>
275276
</fileset>
276277
</copy>
278+
<!-- move build.xml out of .idea, see IDEA-189915 -->
279+
<mkdir dir="${idea.support.dir}"/>
280+
<move todir="${idea.support.dir}" file=".idea/build.xml"/>
277281
<condition property="idea.jtreg.home" value="${jtreg.home}" else = "[jtreg.home]">
278282
<isset property="jtreg.home"/>
279283
</condition>

make/langtools/intellij/ant.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<project version="4">
33
<component name="AntConfiguration">
4-
<buildFile url="file://$PROJECT_DIR$/.idea/build.xml">
4+
<buildFile url="file://$PROJECT_DIR$/build/.idea-support/build.xml">
55
<properties>
66
<property name="langtools.jdk.home" value="@IDEA_TARGET_JDK@" />
77
<property name="intellij.ismake" value="$IsMake$" />

make/langtools/intellij/build.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<!-- importing.xml -->
2-
<project name="langtools" basedir="..">
2+
<project name="langtools" basedir="../..">
33

44
<script language="javascript" classpath=".idea/classes">
55
var LangtoolsLogger = Java.type("idea.LangtoolsIdeaAntLogger");
66
new LangtoolsLogger(project)
77
</script>
88

9-
<import file="../make/langtools/build.xml"/>
9+
<import file="../../make/langtools/build.xml"/>
1010

1111
<target name="cond-clean" unless="${intellij.ismake}">
1212
<antcall target="clean"/>

make/langtools/intellij/misc.xml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,10 @@
99
<jre alt="true" value="@IDEA_TARGET_JDK@" />
1010
<options>@XPATCH@</options>
1111
<ant>
12-
<target file="file://$PROJECT_DIR$/.idea/build.xml" name="build-all-classes" />
12+
<target file="file://$PROJECT_DIR$/build/.idea-support/build.xml" name="build-all-classes" />
1313
</ant>
1414
</component>
1515
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" assert-keyword="true" jdk-15="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
16-
<output url="file://$PROJECT_DIR$/.idea/out" />
16+
<output url="file://$PROJECT_DIR$/build/.idea-support/out" />
1717
</component>
1818
</project>
19-
20-

0 commit comments

Comments
 (0)