[gradle-jflex-plugin] 01/04: Add gradle-2.12.patch and fix incompatibility with Gradle 2.12.
Markus Koschany
apo at moszumanska.debian.org
Thu May 26 17:27:52 UTC 2016
This is an automated email from the git hooks/post-receive script.
apo pushed a commit to branch master
in repository gradle-jflex-plugin.
commit 182219f4d5e2049220215b0c7da4af17f89fc115
Author: Markus Koschany <apo at debian.org>
Date: Thu May 26 19:03:03 2016 +0200
Add gradle-2.12.patch and fix incompatibility with Gradle 2.12.
Closes: #825368
Thanks: Chris Lamb for the report.
---
debian/patches/gradle-2.12.patch | 133 +++++++++++++++++++++++++++++++++++++++
debian/patches/series | 1 +
2 files changed, 134 insertions(+)
diff --git a/debian/patches/gradle-2.12.patch b/debian/patches/gradle-2.12.patch
new file mode 100644
index 0000000..2f5bd30
--- /dev/null
+++ b/debian/patches/gradle-2.12.patch
@@ -0,0 +1,133 @@
+From: Markus Koschany <apo at debian.org>
+Date: Thu, 26 May 2016 19:01:31 +0200
+Subject: gradle 2.12
+
+Debian-Bug: https://bugs.debian.org/825368
+Origin: https://github.com/thomaslee/gradle-jflex-plugin/commit/1bbdf2d6dbf702944d11e24a859e0fe4f957032f
+---
+ gradle/wrapper/gradle-wrapper.properties | 2 +-
+ .../co/tomlee/gradle/plugins/jflex/JFlexPlugin.java | 10 ++++++++--
+ .../co/tomlee/gradle/plugins/jflex/JFlexTask.java | 21 ++++++++++++++++++++-
+ .../jflex/JFlexVirtualSourceDirectoryImpl.java | 8 ++++++--
+ 4 files changed, 35 insertions(+), 6 deletions(-)
+
+diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
+index a6aec3e..714444b 100644
+--- a/gradle/wrapper/gradle-wrapper.properties
++++ b/gradle/wrapper/gradle-wrapper.properties
+@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
+ distributionPath=wrapper/dists
+ zipStoreBase=GRADLE_USER_HOME
+ zipStorePath=wrapper/dists
+-distributionUrl=http\://services.gradle.org/distributions/gradle-1.10-bin.zip
++distributionUrl=http\://services.gradle.org/distributions/gradle-2.12-bin.zip
+diff --git a/src/main/java/co/tomlee/gradle/plugins/jflex/JFlexPlugin.java b/src/main/java/co/tomlee/gradle/plugins/jflex/JFlexPlugin.java
+index 6a443d5..be24ba2 100644
+--- a/src/main/java/co/tomlee/gradle/plugins/jflex/JFlexPlugin.java
++++ b/src/main/java/co/tomlee/gradle/plugins/jflex/JFlexPlugin.java
+@@ -7,6 +7,7 @@ import org.gradle.api.artifacts.Configuration;
+ import org.gradle.api.internal.file.FileResolver;
+ import org.gradle.api.internal.plugins.DslObject;
+ import org.gradle.api.internal.tasks.DefaultSourceSet;
++import org.gradle.api.internal.file.collections.DirectoryFileTreeFactory;
+ import org.gradle.api.plugins.JavaPlugin;
+ import org.gradle.api.plugins.JavaPluginConvention;
+ import org.gradle.api.tasks.SourceSet;
+@@ -17,10 +18,12 @@ import java.util.concurrent.Callable;
+
+ public final class JFlexPlugin implements Plugin<Project> {
+ private final FileResolver fileResolver;
++ private final DirectoryFileTreeFactory directoryFileTreeFactory;
+
+ @Inject
+- public JFlexPlugin(final FileResolver fileResolver) {
++ public JFlexPlugin(final FileResolver fileResolver, final DirectoryFileTreeFactory directoryFileTreeFactory) {
+ this.fileResolver = fileResolver;
++ this.directoryFileTreeFactory = directoryFileTreeFactory;
+ }
+
+ @Override
+@@ -44,7 +47,10 @@ public final class JFlexPlugin implements Plugin<Project> {
+ // 1. Add a new 'jflex' virtual directory mapping
+ //
+ final JFlexVirtualSourceDirectoryImpl jflexSourceSet =
+- new JFlexVirtualSourceDirectoryImpl(((DefaultSourceSet) sourceSet).getDisplayName(), fileResolver);
++ new JFlexVirtualSourceDirectoryImpl(
++ ((DefaultSourceSet) sourceSet).getDisplayName(),
++ fileResolver,
++ directoryFileTreeFactory);
+ new DslObject(sourceSet).getConvention().getPlugins().put("jflex", jflexSourceSet);
+ final String srcDir = String.format("src/%s/jflex", sourceSet.getName());
+ jflexSourceSet.getJflex().srcDir(srcDir);
+diff --git a/src/main/java/co/tomlee/gradle/plugins/jflex/JFlexTask.java b/src/main/java/co/tomlee/gradle/plugins/jflex/JFlexTask.java
+index f64d2be..0cf0d32 100644
+--- a/src/main/java/co/tomlee/gradle/plugins/jflex/JFlexTask.java
++++ b/src/main/java/co/tomlee/gradle/plugins/jflex/JFlexTask.java
+@@ -3,22 +3,41 @@ package co.tomlee.gradle.plugins.jflex;
+ import groovy.lang.Closure;
+ import org.gradle.api.file.FileCollection;
+ import org.gradle.api.tasks.InputFiles;
++import org.gradle.api.tasks.Input;
+ import org.gradle.api.tasks.OutputDirectory;
+ import org.gradle.api.tasks.SourceTask;
+ import org.gradle.api.tasks.TaskAction;
++import org.gradle.api.artifacts.ResolvedConfiguration;
++import org.gradle.api.artifacts.ResolvedArtifact;
+ import org.gradle.process.JavaExecSpec;
+
+ import java.io.File;
++import java.util.Set;
+
+ public class JFlexTask extends SourceTask {
+ private FileCollection jflexClasspath;
+ private File outputDirectory;
+
++ private String mainClass = "jflex.Main";
++ public void setMainClass(final String mainClass) {
++ this.mainClass = mainClass;
++ }
++
++ public void mainClass(final String mainClass) {
++ this.mainClass = mainClass;
++ }
++
++ @Input
++ public String getMainClass() {
++ return mainClass;
++ }
++
++
+ @TaskAction
+ public void generate() throws Exception {
+ getProject().javaexec(new Closure(this) {
+ public void doCall(JavaExecSpec javaExecSpec) {
+- javaExecSpec.setMain("JFlex.Main")
++ javaExecSpec.setMain(mainClass)
+ .setClasspath(getProject().getConfigurations().getByName("jflex"))
+ .args("-d")
+ .args(getOutputDirectory())
+diff --git a/src/main/java/co/tomlee/gradle/plugins/jflex/JFlexVirtualSourceDirectoryImpl.java b/src/main/java/co/tomlee/gradle/plugins/jflex/JFlexVirtualSourceDirectoryImpl.java
+index ff82a21..df15049 100644
+--- a/src/main/java/co/tomlee/gradle/plugins/jflex/JFlexVirtualSourceDirectoryImpl.java
++++ b/src/main/java/co/tomlee/gradle/plugins/jflex/JFlexVirtualSourceDirectoryImpl.java
+@@ -4,14 +4,18 @@ import groovy.lang.Closure;
+ import org.gradle.api.file.SourceDirectorySet;
+ import org.gradle.api.internal.file.DefaultSourceDirectorySet;
+ import org.gradle.api.internal.file.FileResolver;
++import org.gradle.api.internal.file.collections.DirectoryFileTreeFactory;
+ import org.gradle.util.ConfigureUtil;
+
+ public class JFlexVirtualSourceDirectoryImpl implements JFlexVirtualSourceDirectory {
+ private final SourceDirectorySet jflex;
+
+- public JFlexVirtualSourceDirectoryImpl(final String parentDisplayName, FileResolver fileResolver) {
++ public JFlexVirtualSourceDirectoryImpl(
++ final String parentDisplayName,
++ final FileResolver fileResolver,
++ final DirectoryFileTreeFactory directoryFileTreeFactory) {
+ final String displayName = String.format("%s JFle source", parentDisplayName);
+- this.jflex = new DefaultSourceDirectorySet(displayName, fileResolver);
++ this.jflex = new DefaultSourceDirectorySet(displayName, fileResolver, directoryFileTreeFactory);
+ this.jflex.getFilter().include("**/*.l", "**/*.jflex");
+ }
+
diff --git a/debian/patches/series b/debian/patches/series
index 5879227..2e79cb9 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
build.patch
+gradle-2.12.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/gradle-jflex-plugin.git
More information about the pkg-java-commits
mailing list