Skip to content
GitLab
Explore
Sign in
Register
Commits on Source (4)
Standards-Version updated to 4.1.4
· edfe939d
Emmanuel Bourg
authored
Jun 13, 2018
edfe939d
Use salsa.debian.org Vcs-* URLs
· 468c8d50
Emmanuel Bourg
authored
Jun 13, 2018
468c8d50
Automatically set the value of the javac --release attribute
· 2279b143
Emmanuel Bourg
authored
Jun 13, 2018
2279b143
Upload to unstable
· 04e87265
Emmanuel Bourg
authored
Jun 13, 2018
04e87265
Hide whitespace changes
Inline
Side-by-side
debian/changelog
View file @
04e87265
ant (1.10.3-2) unstable; urgency=medium
* Team upload.
* Automatically set the value of the javac --release attribute to improve
the backward compatibility of the code compiled with Java 9 or later.
* Standards-Version updated to 4.1.4
* Use salsa.debian.org Vcs-* URLs
-- Emmanuel Bourg <ebourg@apache.org> Wed, 13 Jun 2018 23:28:33 +0200
ant (1.10.3-1) unstable; urgency=medium
* New upstream release
...
...
debian/control
View file @
04e87265
...
...
@@ -25,9 +25,9 @@ Build-Depends: antlr,
libxml-commons-resolver1.1-java (>= 1.2-7~),
libxz-java,
maven-repo-helper (>> 1.0)
Standards-Version: 4.1.
3
Vcs-Git: https://
anonscm
.debian.org/
git/pkg-java
/ant.git
Vcs-Browser: https://
anonscm
.debian.org/
cgit/pkg-java/ant.gi
t
Standards-Version: 4.1.
4
Vcs-Git: https://
salsa
.debian.org/
java-team
/ant.git
Vcs-Browser: https://
salsa
.debian.org/
java-team/an
t
Homepage: http://ant.apache.org
Package: ant
...
...
debian/patches/0013-auto-adjust-target.patch
View file @
04e87265
...
...
@@ -3,40 +3,58 @@ Author: Emmanuel Bourg <ebourg@apache.org>
Forwarded: no
--- a/src/main/org/apache/tools/ant/taskdefs/Javac.java
+++ b/src/main/org/apache/tools/ant/taskdefs/Javac.java
@@ -213,7 +213,
10
@@
@@ -213,7 +213,
7
@@
*/
public String getSource() {
return source != null
- ? source : getProject().getProperty(MagicNames.BUILD_JAVAC_SOURCE);
+ ? source : LanguageLevel.adjust(
+ getProject().getProperty(MagicNames.BUILD_JAVAC_SOURCE),
+ MagicNames.BUILD_JAVAC_SOURCE,
+ this);
+ ? source : LanguageLevel.adjust(getProject().getProperty(MagicNames.BUILD_JAVAC_SOURCE), MagicNames.BUILD_JAVAC_SOURCE, this);
}
/**
@@ -792,7 +79
5,10
@@
@@ -792,7 +79
2,7
@@
public String getTarget() {
return targetAttribute != null
? targetAttribute
- : getProject().getProperty(MagicNames.BUILD_JAVAC_TARGET);
+ : LanguageLevel.adjust(
+ getProject().getProperty(MagicNames.BUILD_JAVAC_TARGET),
+ MagicNames.BUILD_JAVAC_TARGET,
+ this);
+ : LanguageLevel.adjust(getProject().getProperty(MagicNames.BUILD_JAVAC_TARGET), MagicNames.BUILD_JAVAC_TARGET, this);
}
/**
@@ -1121,6 +1127,9 @@
@@ -1120,7 +1120,7 @@
public void execute() throws BuildException {
checkParameters();
resetFileLists();
+ source = LanguageLevel.adjust(source, "javac -source", this);
+ targetAttribute = LanguageLevel.adjust(targetAttribute, "javac -target", this);
+
-
+ adjustLevels();
// scan source directories and dest directory to build up
// compile list
if (hasPath(src)) {
@@ -1722,4 +1722,24 @@
0x00, 0x00, 0x00, 0x02, 0x00, 0x04
};
+ /**
+ * Adjusts the value of the source/target/release attributes.
+ */
+ private void adjustLevels() {
+ source = LanguageLevel.adjust(source, "javac -source", this);
+ targetAttribute = LanguageLevel.adjust(targetAttribute, "javac -target", this);
+ release = LanguageLevel.adjust(release, "javac --release", this);
+ if (LanguageLevel.isDebianBuild()) {
+ if (release == null && targetAttribute != null) {
+ log("Release attribute not specified, defaulting to the value of the target attribute (" + targetAttribute + ")");
+ release = targetAttribute;
+ } else if (release == null && targetAttribute != null) {
+ log("Release attribute not specified, defaulting to the value of the source attribute (" + source + ")");
+ release = source;
+ }
+ if (release != null && release.startsWith("1.")) {
+ release = release.substring(2);
+ }
+ }
+ }
}
--- a/src/main/org/apache/tools/ant/taskdefs/Javadoc.java
+++ b/src/main/org/apache/tools/ant/taskdefs/Javadoc.java
@@ -2174,7 +2174,7 @@
...
...
@@ -62,7 +80,7 @@ Forwarded: no
+class LanguageLevel {
+
+ /** The minimum language level supported by the current javac */
+ private static final String MIN_LEVEL = "
1.
7";
+ private static final String MIN_LEVEL = "7";
+
+ /** The list of language levels no longer supported by the current javac */
+ private static final List<String> UNSUPPORTED_LEVELS = Arrays.asList(new String[]{"1.1", "1.2", "1.3", "1.4", "1.5", "5", "1.6", "6"});
...
...
debian/rules
View file @
04e87265
...
...
@@ -50,6 +50,3 @@ override_dh_compress:
override_dh_auto_clean:
rm -Rf bin build bootstrap lib/optional/*.jar
get-orig-source:
-uscan --download-current-version --force-download --rename --repack --compression xz