Please consider the attached debdiff for fixing this bug.

thanks

-- 
Tiago Stürmer Daitx
Software Engineer
tiago.da...@canonical.com

PGP Key: 4096R/F5B213BE (hkp://keyserver.ubuntu.com)
Fingerprint = 45D0 FE5A 8109 1E91 866E  8CA4 1931 8D5E F5B2 13BE
diff -Nru gradle-3.4.1/debian/changelog gradle-3.4.1/debian/changelog
--- gradle-3.4.1/debian/changelog	2018-04-11 18:19:46.000000000 -0300
+++ gradle-3.4.1/debian/changelog	2018-04-12 18:01:31.000000000 -0300
@@ -1,3 +1,10 @@
+gradle (3.4.1-8) UNRELEASED; urgency=medium
+
+  * d/p/gnu-style-release-flag-jdk9.patch: Use GNU-style release flag for
+    Java 9 compiler.
+
+ -- Tiago Stürmer Daitx <tiago.da...@ubuntu.com>  Thu, 12 Apr 2018 21:01:31 +0000
+
 gradle (3.4.1-7) unstable; urgency=medium
 
   * Team upload.
diff -Nru gradle-3.4.1/debian/patches/gnu-style-release-flag-jdk9.patch gradle-3.4.1/debian/patches/gnu-style-release-flag-jdk9.patch
--- gradle-3.4.1/debian/patches/gnu-style-release-flag-jdk9.patch	1969-12-31 21:00:00.000000000 -0300
+++ gradle-3.4.1/debian/patches/gnu-style-release-flag-jdk9.patch	2018-04-12 18:01:22.000000000 -0300
@@ -0,0 +1,97 @@
+Description: Use GNU-style release flag for Java 9 compiler
+ Since JDK 9 b135, only the new GNU-style option with double-dashes is
+ supported for the "--release" flag (see
+ https://bugs.openjdk.java.net/browse/JDK-8160851).
+Author: Yannick Welsch <yann...@welsch.lu>
+Origin: upstream, https://github.com/gradle/gradle/commit/142f2f5233e77ba33146efe3815cd3b4b1245993
+Bug-Debian: https://bugs.debian.org/895616
+Forwarded: not-needed
+Applied-Upstream: https://github.com/gradle/gradle/commit/142f2f5233e77ba33146efe3815cd3b4b1245993
+Reviewed-by: Tiago Stürmer Daitx <tiago.da...@ubuntu.com>
+Last-Update: 2018-04-12
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+
+From 142f2f5233e77ba33146efe3815cd3b4b1245993 Mon Sep 17 00:00:00 2001
+From: Yannick Welsch <yann...@welsch.lu>
+Date: Mon, 17 Jul 2017 15:53:17 +0200
+Subject: [PATCH] Use GNU-style release flag for Java 9 compiler (#2474)
+
+Since JDK 9 b135, only the new GNU-style option with double-dashes is supported for the "--release" flag
+(see https://bugs.openjdk.java.net/browse/JDK-8160851).
+---
+ design-docs/jdk9-support.md                                         | 6 +++---
+ .../api/internal/tasks/compile/JavaCompilerArgumentsBuilder.java    | 2 +-
+ .../src/main/java/org/gradle/api/tasks/compile/CompileOptions.java  | 6 +++---
+ .../internal/tasks/compile/JavaCompilerArgumentsBuilderTest.groovy  | 6 +++---
+ .../org/gradle/java/compile/BasicJavaCompilerIntegrationSpec.groovy | 4 ++--
+ 5 files changed, 12 insertions(+), 12 deletions(-)
+
+
+--- a/subprojects/language-java/src/main/java/org/gradle/api/internal/tasks/compile/JavaCompilerArgumentsBuilder.java
++++ b/subprojects/language-java/src/main/java/org/gradle/api/internal/tasks/compile/JavaCompilerArgumentsBuilder.java
+@@ -227,7 +227,7 @@ public class JavaCompilerArgumentsBuilde
+     }
+ 
+     private boolean releaseOptionIsSet(List<String> compilerArgs) {
+-        return compilerArgs != null && compilerArgs.contains("-release");
++        return compilerArgs != null && compilerArgs.contains("--release");
+     }
+ 
+     private void addClasspath() {
+--- a/subprojects/language-java/src/main/java/org/gradle/api/tasks/compile/CompileOptions.java
++++ b/subprojects/language-java/src/main/java/org/gradle/api/tasks/compile/CompileOptions.java
+@@ -315,10 +315,10 @@ public class CompileOptions extends Abst
+      * Defaults to the empty list.
+      *
+      * Compiler arguments not supported by the DSL can be added here. For example, it is possible
+-     * to pass the {@code -release} option of JDK 9:
+-     * <pre><code>compilerArgs.addAll(['-release', '7'])</code></pre>
++     * to pass the {@code --release} option of JDK 9:
++     * <pre><code>compilerArgs.addAll(['--release', '7'])</code></pre>
+      *
+-     * Note that if {@code -release} is added then {@code -target} and {@code -source}
++     * Note that if {@code --release} is added then {@code -target} and {@code -source}
+      * are ignored.
+      */
+     @Input
+--- a/subprojects/language-java/src/test/groovy/org/gradle/api/internal/tasks/compile/JavaCompilerArgumentsBuilderTest.groovy
++++ b/subprojects/language-java/src/test/groovy/org/gradle/api/internal/tasks/compile/JavaCompilerArgumentsBuilderTest.groovy
+@@ -79,14 +79,14 @@ class JavaCompilerArgumentsBuilderTest e
+         builder.build() == ["-target", "1.4"] + defaultOptions
+     }
+ 
+-    def "removes -source and -target option if -release is present"() {
++    def "removes -source and -target option if --release is present"() {
+         when:
+-        spec.compileOptions.compilerArgs += ['-release', '7']
++        spec.compileOptions.compilerArgs += ['--release', '7']
+         spec.sourceCompatibility = '1.7'
+         spec.targetCompatibility = '1.7'
+ 
+         then:
+-        builder.build() == defaultOptions + ['-release', '7']
++        builder.build() == defaultOptions + ['--release', '7']
+     }
+ 
+     def "generates -d option"() {
+--- a/subprojects/plugins/src/integTest/groovy/org/gradle/java/compile/BasicJavaCompilerIntegrationSpec.groovy
++++ b/subprojects/plugins/src/integTest/groovy/org/gradle/java/compile/BasicJavaCompilerIntegrationSpec.groovy
+@@ -147,7 +147,7 @@ public class FxApp extends Application {
+         given:
+         goodCode()
+         buildFile << """
+-compileJava.options.compilerArgs.addAll(['-release', '7'])
++compileJava.options.compilerArgs.addAll(['--release', '7'])
+ """
+ 
+         expect:
+@@ -170,7 +170,7 @@ public class FailsOnJava7 {
+ '''
+ 
+         buildFile << """
+-compileJava.options.compilerArgs.addAll(['-release', '7'])
++compileJava.options.compilerArgs.addAll(['--release', '7'])
+ """
+ 
+         expect:
diff -Nru gradle-3.4.1/debian/patches/series gradle-3.4.1/debian/patches/series
--- gradle-3.4.1/debian/patches/series	2018-04-11 18:19:46.000000000 -0300
+++ gradle-3.4.1/debian/patches/series	2018-04-12 17:57:16.000000000 -0300
@@ -30,3 +30,4 @@
 disallow-both-module-source-path-and-source-path.patch
 source-level.patch
 java8-compatibility.patch
+gnu-style-release-flag-jdk9.patch
__
This is the maintainer address of Debian's Java team
<http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-java-maintainers>. 
Please use
debian-j...@lists.debian.org for discussions and questions.

Reply via email to