Skip to content

Commit

Permalink
Add support for Java8 compiler to build all targets.
Browse files Browse the repository at this point in the history
  • Loading branch information
EBatTiVo committed Sep 22, 2016
1 parent dc24ed0 commit 6efb82c
Show file tree
Hide file tree
Showing 8 changed files with 71 additions and 15 deletions.
39 changes: 32 additions & 7 deletions build-test.xml
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,13 @@
verbose="false"
debug="true"
debuglevel="lines,vars,source"
source="1.6"
target="1.6"
source="${plugin.java.source.compatibility}"
target="${plugin.java.target.compatibility}"
includeantruntime="false" >

<!-- <compilerarg value="-Xlint:deprecation" /> -->
<!-- <compilerarg value="-Xlint:unchecked" /> -->

<src path="${version.specific.code.location}" />
<src path="src/common" />
<src path="src/icons" />
Expand Down Expand Up @@ -105,28 +108,50 @@

<property name="suspend" value="n"/>

<!-- On a mac, the proper JRE is included as part of the IDEA distribution. -->
<condition property="idea.test.jvm" value="${idea.ultimate.build}/jre/jre/bin/java">
<os family="mac"/>
</condition>
<property name="idea.test.jvm" value="java"/>

<condition property="is.java8plus" value="true">
<or>
<equals arg1="${ant.java.version}" arg2="1.8"/>
<equals arg1="${ant.java.version}" arg2="1.9"/>
</or>
</condition>
<property name="is.java8plus" value="false"/>
<echo level="verbose">Java version of ${ant.java.version} is Java8 or greater? ${is.java8plus}</echo>

<!-- Tests fail with a default MaxPermSize. They use up all of the PermGen memory. -->
<condition property="test.extraargs" value="-XX:MaxMetaspaceSize=256M">
<istrue value="${is.java8plus}"/>
</condition>
<property name="test.extraargs" value="-XX:MaxPermSize=256M"/>
<echo level="verbose">Extra args being used on tests: ${test.extraargs}</echo>

<junit
haltonfailure="false"
haltonfailure="true"
showoutput="no"
failureProperty="failure_found"
fork="yes"
forkmode="once"
reloading="no"
enabletestlistenerevents="true">
enabletestlistenerevents="true"
jvm="${idea.test.jvm}">

<jvmarg value="-Didea.home.path=${idea.ultimate.build}"/>
<jvmarg value="-Xbootclasspath/a:${idea.ultimate.build}/lib/boot.jar"/>
<jvmarg value="-Dfile.encoding=UTF-8"/>
<jvmarg value="-ea"/>
<jvmarg line="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=${suspend},address=43251"/>
<jvmarg value="-Didea.launcher.bin.path=${idea.ultimate.build}/bin"/>
<!-- Tests fail with a default MaxPermSize. They use up all of the PermGen memory. -->
<jvmarg value="-XX:MaxPermSize=256m"/>
<jvmarg line="${test.extraargs}"/>
<classpath refid="classpath.test"/>

<formatter type="brief" usefile="false"/>

<batchtest>
<batchtest fork="yes">
<fileset dir="testSrc">
<include name="**/*Test.java"/>
<exclude name="**/*TestCase.java"/>
Expand Down
12 changes: 6 additions & 6 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@
destdir="${jps.build.output.directory}"
verbose="false"
debug="false"
source="1.6"
target="1.6"
source="${plugin.java.source.compatibility}"
target="${plugin.java.target.compatibility}"
fork="true"
includeantruntime="true" >

Expand All @@ -69,8 +69,8 @@
destdir="${common.build.output.directory}"
verbose="false"
debug="true"
source="1.6"
target="1.6"
source="${plugin.java.source.compatibility}"
target="${plugin.java.target.compatibility}"
includeantruntime="true" >

<src path="common/src" />
Expand All @@ -88,8 +88,8 @@
destdir="${plugin.build.output.directory}"
verbose="false"
debug="true"
source="1.6"
target="1.6"
source="${plugin.java.source.compatibility}"
target="${plugin.java.target.compatibility}"
includedestclasses="false"
createmissingpackageinfoclass="false"
includeantruntime="false" >
Expand Down
1 change: 1 addition & 0 deletions common.xml
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@
// Lookup table for properties files. Add new versions here.
var propertiesFile = "";
switch(parseInt(codeLine, 10)) {
case 162: propertiesFile = "idea_v16.properties"; break;
case 145: propertiesFile = "idea_v16.properties"; break;
case 143: propertiesFile = "idea_v15.properties"; break;
case 141:
Expand Down
6 changes: 6 additions & 0 deletions idea_v14.1.5.properties
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,9 @@ plugin.installable.until=141.9999
# Where to find Idea14-specific code.
# ###################################################
version.specific.code.location=src/14.1

# ###################################################
# Java compatibility.
# ###################################################
plugin.java.source.compatibility=1.6
plugin.java.target.compatibility=1.6
6 changes: 6 additions & 0 deletions idea_v14.1.properties
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,9 @@ plugin.installable.until=141.2734
# Where to find Idea14-specific code.
# ###################################################
version.specific.code.location=src/14.1

# ###################################################
# Java compatibility.
# ###################################################
plugin.java.source.compatibility=1.6
plugin.java.target.compatibility=1.6
6 changes: 6 additions & 0 deletions idea_v14.properties
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,9 @@ plugin.installable.until=139.9999
# Where to find Idea14-specific code.
# ###################################################
version.specific.code.location=src/14

# ###################################################
# Java compatibility.
# ###################################################
plugin.java.source.compatibility=1.6
plugin.java.target.compatibility=1.6
6 changes: 6 additions & 0 deletions idea_v15.properties
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,9 @@ plugin.installable.until=143.9999
# ###################################################
# Use the 14.1 source tree, for the moment.
version.specific.code.location=src/14.1

# ###################################################
# Java compatibility.
# ###################################################
plugin.java.source.compatibility=1.6
plugin.java.target.compatibility=1.6
10 changes: 8 additions & 2 deletions idea_v16.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Properties for building against IDEA version 15.
# Properties for building against IDEA version 16.
#

# Target version of IDEA that we typically build for.
Expand All @@ -22,7 +22,13 @@ plugin.installable.since=145.0
plugin.installable.until=145.9999

# ###################################################
# Where to find Idea14-specific code.
# Where to find Idea16-specific code.
# ###################################################
# Use the 14.1 source tree, for the moment.
version.specific.code.location=src/14.1

# ###################################################
# Java compatibility.
# ###################################################
plugin.java.source.compatibility=1.8
plugin.java.target.compatibility=1.8

0 comments on commit 6efb82c

Please sign in to comment.