summaryrefslogtreecommitdiff
path: root/build.xml
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2014-06-03 16:34:23 +0200
committerJason Zaugg <jzaugg@gmail.com>2015-04-21 16:51:01 +1000
commite1895d64f87dc3c699a3ccbc8a3143b18d3b5bb1 (patch)
treeb71ff51edc5d43d4da15c84a25d10f746f5b4bcc /build.xml
parent74e324da66ad43466866b4f886fc03d24c81d18f (diff)
downloadscala-e1895d64f87dc3c699a3ccbc8a3143b18d3b5bb1.tar.gz
scala-e1895d64f87dc3c699a3ccbc8a3143b18d3b5bb1.tar.bz2
scala-e1895d64f87dc3c699a3ccbc8a3143b18d3b5bb1.zip
Add scala-java8-compat to scala-library.jar
When the ant build is run with `-Dscala-java8-compat.package`, the contents of `org.scala-lang.modules:scala-java8-compat` are spliced into `scala-library.jar`. This is handy to facilitate downstream testing of indy lambdas, we can just use the the compiler options `-target 1.8 -Ydelambdafy:method -Xexperimental` without needed to add `scala-java8-compat.jar` to the compile and runtime classpaths. (Classpath augmentation doesn't appear to be straight forward in partest or in the community build.)
Diffstat (limited to 'build.xml')
-rwxr-xr-xbuild.xml38
1 files changed, 38 insertions, 0 deletions
diff --git a/build.xml b/build.xml
index 4b79b68a02..cf7175cbab 100755
--- a/build.xml
+++ b/build.xml
@@ -266,6 +266,11 @@ TODO:
-->
<if><not><isset property="maven-deps-done"></isset></not><then>
<mkdir dir="${user.home}/.m2/repository"/>
+
+ <artifact:remoteRepository id="sonatype-release" url="https://oss.sonatype.org/content/repositories/releases"/>
+ <artifact:remoteRepository id="sonatype-snapshots" url="https://oss.sonatype.org/content/repositories/snapshots"/>
+ <artifact:remoteRepository id="extra-repo" url="${extra.repo.url}"/>
+
<!-- This task has an issue where if the user directory does not exist, so we create it above. UGH. -->
<artifact:dependencies pathId="extra.tasks.classpath" filesetId="extra.tasks.fileset">
<dependency groupId="biz.aQute" artifactId="bnd" version="1.50.0"/>
@@ -307,6 +312,36 @@ TODO:
<artifact:remoteRepository id="sonatype-release" url="https://oss.sonatype.org/content/repositories/releases"/>
<artifact:remoteRepository id="extra-repo" url="${extra.repo.url}"/>
+ <!-- scala-java8-compat, used by the experimental -target jvm-1.8 support. -->
+ <if><isset property="scala-java8-compat.package"/><then>
+ <property name="scala-java8-compat.version" value="0.2.0"/>
+ <property name="scala-java8-compat.binary.version" value="2.11"/>
+ <artifact:dependencies pathId="scala-java8-compat.classpath" filesetId="scala-java8-compat.fileset">
+ <dependency groupId="org.scala-lang.modules" artifactId="scala-java8-compat_${scala-java8-compat.binary.version}" version="${scala-java8-compat.version}">
+ <exclusion groupId="org.scala-lang" artifactId="scala-library"/>
+ </dependency>
+ </artifact:dependencies>
+ <property name="scala-java8-compat-classes" value="${build-quick.dir}/scala-java8-compat"/>
+ <delete dir="${scala-java8-compat-classes}"/>
+ <unzip dest="${scala-java8-compat-classes}">
+ <fileset refid="scala-java8-compat.fileset"/>
+ <patternset>
+ <include name="**/*.class"/>
+ </patternset>
+ </unzip>
+ <path id="scala-java8-compat.libs">
+ <pathelement location="${scala-java8-compat-classes}"/>
+ </path>
+ <fileset id="scala-java8-compat.fileset" dir="${scala-java8-compat-classes}">
+ <include name="**/*"/>
+ </fileset>
+ </then>
+ <else>
+ <path id="scala-java8-compat.libs"/>
+ <fileset id="scala-java8-compat.fileset" dir="." excludes="**"/>
+ </else>
+ </if>
+
<!-- prepare, for each of the names below, the property "@{name}.cross", set to the
necessary cross suffix (usually something like "_2.11.0-M6". -->
<prepareCross name="scala-xml" />
@@ -718,6 +753,7 @@ TODO:
<pathelement location="${build-locker.dir}/classes/library"/>
<path refid="forkjoin.classpath"/>
<path refid="aux.libs"/>
+ <path refid="scala-java8-compat.libs"/>
</path>
<path id="locker.reflect.build.path">
@@ -739,6 +775,7 @@ TODO:
<pathelement location="${build-quick.dir}/classes/library"/>
<path refid="forkjoin.classpath"/>
<path refid="aux.libs"/>
+ <path refid="scala-java8-compat.libs"/>
</path>
<path id="quick.actors.build.path">
@@ -827,6 +864,7 @@ TODO:
<path id="pack.library.files">
<fileset dir="${build-quick.dir}/classes/library"/>
<fileset dir="${forkjoin-classes}"/>
+ <fileset refid="scala-java8-compat.fileset"/>
</path>
<path id="pack.actors.files">