[Jython-checkins] jython: Target Java 8 in Jython v2.7.2 (source compatible with 7).
jeff.allen
jython-checkins at python.org
Sun Sep 22 16:37:15 EDT 2019
https://hg.python.org/jython/rev/1a6a5516d6e3
changeset: 8295:1a6a5516d6e3
user: Jeff Allen <ja.py at farowl.co.uk>
date: Sat Sep 21 10:33:05 2019 +0100
summary:
Target Java 8 in Jython v2.7.2 (source compatible with 7).
files:
.travis.yml | 8 ++++++--
build.gradle | 15 ++++++++-------
build.xml | 10 +++++++++-
3 files changed, 23 insertions(+), 10 deletions(-)
diff --git a/.travis.yml b/.travis.yml
--- a/.travis.yml
+++ b/.travis.yml
@@ -12,8 +12,12 @@
matrix:
include:
- os: linux
- dist: precise
- jdk: oraclejdk7
+ dist: xenial
+ addons:
+ apt:
+ packages:
+ - ant
+ jdk: openjdk8
- os: linux
dist: xenial
diff --git a/build.gradle b/build.gradle
--- a/build.gradle
+++ b/build.gradle
@@ -60,9 +60,13 @@
// ---------------- Miscellaneous configuration --------------------------------
-// Support Java 7 onwards
-sourceCompatibility = '1.7'
-targetCompatibility = '1.7'
+/*
+ * We support Java 8 onwards officially, up to v2.7.2, but retain the option of
+ * compiling for Java 7 (in v2.7.2) by maintaining compatibility in the code
+ * base and in the choice of JARs.
+ */
+sourceCompatibility = '1.7' // Make both 1.8 after 2.7.2 released
+targetCompatibility = '1.8'
project.compileJava.options.debug = true
@@ -90,10 +94,7 @@
repositories {
- /*
- * Jython is distributed through Maven Central. Get our dependencies there
- * too.
- */
+ // Jython is distributed through Maven Central. Get our dependencies there too.
mavenCentral()
}
diff --git a/build.xml b/build.xml
--- a/build.xml
+++ b/build.xml
@@ -88,9 +88,16 @@
<target name="common-config" depends="common-constants">
<!-- Initialisations common to full and developer builds. -->
+
<property file="${user.home}/ant.properties" />
<property file="${basedir}/ant.properties" />
- <property name="jython.java.version" value="1.7" />
+ <property name="jython.java.version" value="1.8" />
+
+ <!-- Temporarily fix the source compatibility at Java 7 to keep open the possibility of
+ compiling for that target. After v2.7.2 is out, delete this assignment, and this comment,
+ reconsider choice of JARs, and feel free to use Java 8 syntax. -->
+ <property name="jdk.source.version" value="1.7" />
+
<!-- Designate the official release encoded in parts. In normal times, this is the previous
official release, e.g. 2.7.2a1 while working towards 2.7.2b1, and sys.version will be
"2.7.2a1+". If you are trying to building an official release, designate that release.
@@ -100,6 +107,7 @@
<property name="jython.minor_version" value="7"/>
<property name="jython.micro_version" value="2"/>
<property name="jython.release_level" value="${PY_RELEASE_LEVEL_ALPHA}"/>
+
<!-- Zero at full release: one-up number for alpha, beta and candidate versions. -->
<property name="jython.release_serial" value="1"/>
</target>
--
Repository URL: https://hg.python.org/jython
More information about the Jython-checkins
mailing list