diff options
author | Lukas Rytz <lukas.rytz@gmail.com> | 2015-06-30 12:33:07 +0200 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@typesafe.com> | 2015-07-01 11:46:29 -0700 |
commit | 8247b8f077c96ba9a017b53de4d8062fe428c4a7 (patch) | |
tree | 52e0fcabfe451bc5e94dbe6183bc039b2ce006c3 /src/build | |
parent | d2cffb9ad2e431d62c890a7fb9d56520739e07b2 (diff) | |
download | scala-8247b8f077c96ba9a017b53de4d8062fe428c4a7.tar.gz scala-8247b8f077c96ba9a017b53de4d8062fe428c4a7.tar.bz2 scala-8247b8f077c96ba9a017b53de4d8062fe428c4a7.zip |
Prepare build for inclusion of java8-compat
<h1>Allow mixed builds in ant</h1>
The `JFunction` classes depend on the `FunctionN` traits, so the
Java compiler needs the Scala library on the classpath.
At the same time, while compiling the Scala library, the symbols for
`JFunction` classes need to be available to emit indy-lambda closures.
Therefore we pass the `JFunctions` as Java sources while compiling the
Scala library.
<h1>Upgrade versions of osgi tools</h1>
Set the required java version in bnd files (JavaSE-1.8).
Introduce `scala-swing.version.osgi` as a quick hack to
allow manually deriving an osgi-friendly version number
for the `scala-swing.version.number`. The latter is used
to resolve the artifact, the osgi version is just so we
can generate a bundle that osgi will accept.
Bnd 1.50 doesn't work with Java 8 classfiles, so upgrade to 2.4.1.
Also upgrade all other tools to make tests pass.
For `org.eclipse.osgi` we moved to the group ID `org.eclipse.tycho`,
where there's a newer version available. The osgi tests would fail
with the most recent version available in the `org.eclipse.osgi` groupID.
The new version of bnd only copies *classfiles* from the
original into the resulting jar, while the old version also copied
all other files. This caused osgi test failure with a `NoClassDefFound`,
which was really due to a `NumberFormatException` in `ScalaVersion`,
as it couldn't find the properties file to parse the version in...
Include resources from source jar into osgi bundle as follows:
```
Include-Resource: @@SOURCE_JARNAME@
```
This makes bnd copy all resources from the source jar. I ran the
following on the osgi artifacts of this branch, and on 2.11.x:
```
for f in `find build/osgi -name '*.jar' -a -not -name '*src.jar'`; do unzip -l $f | grep -v '\.class' ; done
```
Comparing the two file lists, things look OK:
https://gist.github.com/lrytz/be08db051a53eded192d
Diffstat (limited to 'src/build')
-rw-r--r-- | src/build/bnd/scala-compiler-doc.bnd | 3 | ||||
-rw-r--r-- | src/build/bnd/scala-compiler-interactive.bnd | 3 | ||||
-rw-r--r-- | src/build/bnd/scala-compiler.bnd | 3 | ||||
-rw-r--r-- | src/build/bnd/scala-library.bnd | 3 | ||||
-rw-r--r-- | src/build/bnd/scala-parser-combinators.bnd | 3 | ||||
-rw-r--r-- | src/build/bnd/scala-reflect.bnd | 3 | ||||
-rw-r--r-- | src/build/bnd/scala-swing.bnd | 3 | ||||
-rw-r--r-- | src/build/bnd/scala-xml.bnd | 3 |
8 files changed, 16 insertions, 8 deletions
diff --git a/src/build/bnd/scala-compiler-doc.bnd b/src/build/bnd/scala-compiler-doc.bnd index 9d6d0304d1..5b662e8cef 100644 --- a/src/build/bnd/scala-compiler-doc.bnd +++ b/src/build/bnd/scala-compiler-doc.bnd @@ -4,4 +4,5 @@ ver: @SCALA_COMPILER_DOC_VERSION@ Bundle-Version: ${ver} Export-Package: *;version=${ver} Import-Package: scala.*;version="${range;[==,=+);@VERSION@}",* -Bundle-RequiredExecutionEnvironment: JavaSE-1.6, JavaSE-1.7 +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Include-Resource: @@SOURCE_JARNAME@ diff --git a/src/build/bnd/scala-compiler-interactive.bnd b/src/build/bnd/scala-compiler-interactive.bnd index 07e3de35b0..fbfff60801 100644 --- a/src/build/bnd/scala-compiler-interactive.bnd +++ b/src/build/bnd/scala-compiler-interactive.bnd @@ -4,4 +4,5 @@ ver: @SCALA_COMPILER_INTERACTIVE_VERSION@ Bundle-Version: ${ver} Export-Package: *;version=${ver} Import-Package: scala.*;version="${range;[==,=+);@VERSION@}",* -Bundle-RequiredExecutionEnvironment: JavaSE-1.6, JavaSE-1.7 +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Include-Resource: @@SOURCE_JARNAME@ diff --git a/src/build/bnd/scala-compiler.bnd b/src/build/bnd/scala-compiler.bnd index 2bd24d780d..3e60c4973c 100644 --- a/src/build/bnd/scala-compiler.bnd +++ b/src/build/bnd/scala-compiler.bnd @@ -9,4 +9,5 @@ Import-Package: jline.*;resolution:=optional, \ scala.xml.*;version="${range;[====,====];@XML_VERSION@}";resolution:=optional, \ scala.*;version="${range;[==,=+);${ver}}", \ * -Bundle-RequiredExecutionEnvironment: JavaSE-1.6, JavaSE-1.7 +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Include-Resource: @@SOURCE_JARNAME@ diff --git a/src/build/bnd/scala-library.bnd b/src/build/bnd/scala-library.bnd index 7eb4fa4b2a..e211c5d1ad 100644 --- a/src/build/bnd/scala-library.bnd +++ b/src/build/bnd/scala-library.bnd @@ -4,4 +4,5 @@ ver: @VERSION@ Bundle-Version: ${ver} Export-Package: *;version=${ver} Import-Package: sun.misc;resolution:=optional, * -Bundle-RequiredExecutionEnvironment: JavaSE-1.6, JavaSE-1.7 +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Include-Resource: @@SOURCE_JARNAME@ diff --git a/src/build/bnd/scala-parser-combinators.bnd b/src/build/bnd/scala-parser-combinators.bnd index ef8646cbd0..515084f4a8 100644 --- a/src/build/bnd/scala-parser-combinators.bnd +++ b/src/build/bnd/scala-parser-combinators.bnd @@ -4,4 +4,5 @@ ver: @PARSER_COMBINATORS_VERSION@ Bundle-Version: ${ver} Export-Package: *;version=${ver} Import-Package: scala.*;version="${range;[==,=+);@VERSION@}",* -Bundle-RequiredExecutionEnvironment: JavaSE-1.6, JavaSE-1.7 +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Include-Resource: @@SOURCE_JARNAME@ diff --git a/src/build/bnd/scala-reflect.bnd b/src/build/bnd/scala-reflect.bnd index e4bc54e52e..59db311f8d 100644 --- a/src/build/bnd/scala-reflect.bnd +++ b/src/build/bnd/scala-reflect.bnd @@ -6,4 +6,5 @@ Export-Package: *;version=${ver} Import-Package: scala.*;version="${range;[==,=+);${ver}}", \ scala.tools.nsc;resolution:=optional;version="${range;[==,=+);${ver}}", \ * -Bundle-RequiredExecutionEnvironment: JavaSE-1.6, JavaSE-1.7 +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Include-Resource: @@SOURCE_JARNAME@ diff --git a/src/build/bnd/scala-swing.bnd b/src/build/bnd/scala-swing.bnd index f8b50baa91..24cd9f6f90 100644 --- a/src/build/bnd/scala-swing.bnd +++ b/src/build/bnd/scala-swing.bnd @@ -4,4 +4,5 @@ ver: @SCALA_SWING_VERSION@ Bundle-Version: ${ver} Export-Package: *;version=${ver} Import-Package: scala.*;version="${range;[==,=+);@VERSION@}",* -Bundle-RequiredExecutionEnvironment: JavaSE-1.6,JavaSE-1.7 +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Include-Resource: @@SOURCE_JARNAME@ diff --git a/src/build/bnd/scala-xml.bnd b/src/build/bnd/scala-xml.bnd index 01bf0144eb..b7b19824e8 100644 --- a/src/build/bnd/scala-xml.bnd +++ b/src/build/bnd/scala-xml.bnd @@ -4,4 +4,5 @@ ver: @XML_VERSION@ Bundle-Version: ${ver} Export-Package: *;version=${ver} Import-Package: scala.*;version="${range;[==,=+);@VERSION@}",* -Bundle-RequiredExecutionEnvironment: JavaSE-1.6, JavaSE-1.7 +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Include-Resource: @@SOURCE_JARNAME@ |