[gradle-debian-helper] 03/04: Enable parallel builds if the DH --parallel option is set (Closes: #825617)

Emmanuel Bourg ebourg-guest at moszumanska.debian.org
Wed Aug 3 09:38:23 UTC 2016


This is an automated email from the git hooks/post-receive script.

ebourg-guest pushed a commit to branch master
in repository gradle-debian-helper.

commit 512911c7952aa8f501ab1fa01f23bc358ea2b6c9
Author: Emmanuel Bourg <ebourg at apache.org>
Date:   Wed Aug 3 11:32:28 2016 +0200

    Enable parallel builds if the DH --parallel option is set (Closes: #825617)
---
 debian/changelog                             | 1 +
 gradle-helper-plugin/src/main/perl/gradle.pm | 7 +++++++
 2 files changed, 8 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 7f1f492..522788f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,5 +1,6 @@
 gradle-debian-helper (1.3) UNRELEASED; urgency=medium
 
+  * Enable parallel builds if the DH --parallel option is set (Closes: #825617)
   * Use the current directory as the user home to avoid build failures
     with pbuilder when 'gradle install' writes the artifacts in the local
     Maven repository.
diff --git a/gradle-helper-plugin/src/main/perl/gradle.pm b/gradle-helper-plugin/src/main/perl/gradle.pm
index 5e44c90..69719a0 100644
--- a/gradle-helper-plugin/src/main/perl/gradle.pm
+++ b/gradle-helper-plugin/src/main/perl/gradle.pm
@@ -34,6 +34,13 @@ sub new {
 	#	"--init-script", "/usr/share/gradle-debian-helper/init.gradle",
 		);	
 
+	my $numthreads = $this->get_parallel();
+	if ($numthreads == -1) {
+		push(@{$this->{gradle_cmd}}, "--parallel");
+	} elsif ($numthreads > 1) {
+		push(@{$this->{gradle_cmd}}, "--parallel", "--max-workers=$numthreads");
+	}
+
 	return $this;
 }
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/gradle-debian-helper.git



More information about the pkg-java-commits mailing list