[jcommander] 04/12: Switch to build using Gradle (following upstream's decision)

Kai-Chung Yan seamlik-guest at moszumanska.debian.org
Tue Feb 13 17:55:17 UTC 2018


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

seamlik-guest pushed a commit to branch master
in repository jcommander.

commit 2b281f77eb2444c7a93b41a80197d1c370fe7de6
Author: 殷啟聰 | Kai-Chung Yan <seamlikok at gmail.com>
Date:   Wed Feb 7 22:35:38 2018 +0800

    Switch to build using Gradle (following upstream's decision)
---
 debian/control                        |  2 +-
 debian/libjcommander-java-doc.install |  3 +--
 debian/libjcommander-java.poms        | 29 +----------------------------
 debian/maven.cleanIgnoreRules         | 17 -----------------
 debian/maven.publishedRules           | 19 -------------------
 debian/maven.rules                    | 19 -------------------
 debian/patches/build.gradle.diff      | 30 ++++++++++++++++++++++++++++++
 debian/patches/series                 |  1 +
 debian/rules                          | 11 +++++++++--
 9 files changed, 43 insertions(+), 88 deletions(-)

diff --git a/debian/control b/debian/control
index 327836f..a99d212 100644
--- a/debian/control
+++ b/debian/control
@@ -23,7 +23,7 @@ Description: Java framework for parsing command line parameters
 Package: libjcommander-java-doc
 Architecture: all
 Section: doc
-Depends: ${misc:Depends}, ${maven:DocDepends}
+Depends: default-jdk-doc, ${misc:Depends}, ${maven:DocDepends}
 Recommends: ${maven:DocOptionalDepends}
 Suggests: libjcommander-java
 Description: Java framework for parsing command line parameters (documentation)
diff --git a/debian/libjcommander-java-doc.install b/debian/libjcommander-java-doc.install
index 24056ba..9f5283b 100644
--- a/debian/libjcommander-java-doc.install
+++ b/debian/libjcommander-java-doc.install
@@ -1,2 +1 @@
-target/apidocs/* usr/share/doc/libjcommander-java/api
-
+build/docs/javadoc/* usr/share/doc/libjcommander-java/api
\ No newline at end of file
diff --git a/debian/libjcommander-java.poms b/debian/libjcommander-java.poms
index 64b1188..e0b5d0f 100644
--- a/debian/libjcommander-java.poms
+++ b/debian/libjcommander-java.poms
@@ -1,28 +1 @@
-# List of POM files for the package
-# Format of this file is:
-# <path to pom file> [option]*
-# where option can be:
-#   --ignore: ignore this POM and its artifact if any
-#   --ignore-pom: don't install the POM. To use on POM files that are created
-#     temporarily for certain artifacts such as Javadoc jars. [mh_install, mh_installpoms]
-#   --no-parent: remove the <parent> tag from the POM
-#   --package=<package>: an alternative package to use when installing this POM
-#      and its artifact
-#   --has-package-version: to indicate that the original version of the POM is the same as the upstream part
-#      of the version for the package.
-#   --keep-elements=<elem1,elem2>: a list of XML elements to keep in the POM
-#      during a clean operation with mh_cleanpom or mh_installpom
-#   --artifact=<path>: path to the build artifact associated with this POM,
-#      it will be installed when using the command mh_install. [mh_install]
-#   --java-lib: install the jar into /usr/share/java to comply with Debian
-#      packaging guidelines
-#   --usj-name=<name>: name to use when installing the library in /usr/share/java
-#   --usj-version=<version>: version to use when installing the library in /usr/share/java
-#   --no-usj-versionless: don't install the versionless link in /usr/share/java
-#   --dest-jar=<path>: the destination for the real jar.
-#     It will be installed with mh_install. [mh_install]
-#   --classifier=<classifier>: Optional, the classifier for the jar. Empty by default.
-#   --site-xml=<location>: Optional, the location for site.xml if it needs to be installed.
-#     Empty by default. [mh_install]
-#
-pom.xml --no-parent --has-package-version --java-lib
+build/debian/jcommander.pom --artifact=build/libs/jcommander-*.jar --java-lib --relocate=com.beust:jcommander:1.x
diff --git a/debian/maven.cleanIgnoreRules b/debian/maven.cleanIgnoreRules
deleted file mode 100644
index b47b61d..0000000
--- a/debian/maven.cleanIgnoreRules
+++ /dev/null
@@ -1,17 +0,0 @@
-# Maven clean ignore rules - ignore some Maven dependencies and plugins
-# during the clean phase of a Maven build
-# Format of this file is:
-# [group] [artifact] [type] [version] [classifier] [scope]
-# where each element can be either
-# - the exact string, for example org.apache for the group, or 3.1
-#   for the version. In this case, the element is simply matched
-#   and left as it is
-# - * (the star character, alone). In this case, anything will
-#   match and be left as it is. For example, using * on the
-#  position of the artifact field will match any artifact id
-# All elements much match before a rule can be applied
-# Example rule: match jar with groupid= junit, artifactid= junit
-# and version starting with 3., this dependency is then removed
-# from the POM before mvn clean is called
-#   junit junit jar s/3\\..*/3.x/
-
diff --git a/debian/maven.publishedRules b/debian/maven.publishedRules
deleted file mode 100644
index 822f087..0000000
--- a/debian/maven.publishedRules
+++ /dev/null
@@ -1,19 +0,0 @@
-# Maven published rules - additional rules to publish, to help
-# the packaging work of Debian maintainers using mh_make
-# Format of this file is:
-# [group] [artifact] [type] [version] [classifier] [scope]
-# where each element can be either
-# - the exact string, for example org.apache for the group, or 3.1
-#   for the version. In this case, the element is simply matched
-#   and left as it is
-# - * (the star character, alone). In this case, anything will
-#   match and be left as it is. For example, using * on the
-#  position of the artifact field will match any artifact id
-# - a regular expression of the form s/match/replace/
-#   in this case, elements that match are transformed using
-#   the regex rule.
-# All elements much match before a rule can be applied
-# Example rule: match jar with groupid= junit, artifactid= junit
-# and version starting with 3., replacing the version with 3.x
-#   junit junit jar s/3\\..*/3.x/
-
diff --git a/debian/maven.rules b/debian/maven.rules
deleted file mode 100644
index 0ad5383..0000000
--- a/debian/maven.rules
+++ /dev/null
@@ -1,19 +0,0 @@
-# Maven rules - transform Maven dependencies and plugins
-# Format of this file is:
-# [group] [artifact] [type] [version] [classifier] [scope]
-# where each element can be either
-# - the exact string, for example org.apache for the group, or 3.1
-#   for the version. In this case, the element is simply matched
-#   and left as it is
-# - * (the star character, alone). In this case, anything will
-#   match and be left as it is. For example, using * on the
-#  position of the artifact field will match any artifact id
-# - a regular expression of the form s/match/replace/
-#   in this case, elements that match are transformed using
-#   the regex rule.
-# All elements much match before a rule can be applied
-# Example rule: match jar with groupid= junit, artifactid= junit
-# and version starting with 3., replacing the version with 3.x
-#   junit junit jar s/3\\..*/3.x/
-
-com.beust jcommander jar s/1\..*/1.x/ * *
diff --git a/debian/patches/build.gradle.diff b/debian/patches/build.gradle.diff
new file mode 100644
index 0000000..3e519a4
--- /dev/null
+++ b/debian/patches/build.gradle.diff
@@ -0,0 +1,30 @@
+Description: Makes the build scripts behave properly.
+Author: Kai-Chung Yan (殷啟聰)
+Last-Update: 2018-02-07
+--- a/build.gradle
++++ b/build.gradle
+@@ -8,16 +8,12 @@
+     }
+ }
+ 
+-plugins {
+-    id "com.jfrog.bintray" version "1.2"
+-}
+-
+-version = '1.58'
++group = 'com.beust'
++version = System.env.DEB_VERSION_UPSTREAM
+ 
+ apply plugin: 'java'
+ apply plugin: 'eclipse'
+ apply plugin: 'idea'
+-apply from: 'gradle/publishing.gradle'
+ 
+ repositories {
+     jcenter()
+@@ -40,5 +36,4 @@
+ 
+ test {
+     // enable TestNG support (default is JUnit)
+-    useTestNG()
+ }
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..fbf75e6
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+build.gradle.diff
diff --git a/debian/rules b/debian/rules
index 42303d8..a112631 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,7 +1,14 @@
 #!/usr/bin/make -f
 
+include /usr/share/dpkg/pkg-info.mk
+
+export DEB_VERSION_UPSTREAM
+
 %:
-	dh $@ --buildsystem=maven
+	dh $@ --buildsystem=gradle --with maven-repo-helper
+
+override_dh_auto_build:
+	dh_auto_build -- assemble javadoc
 
 get-orig-source:
-	uscan --download-current-version --force-download --repack --compression xz
+	uscan --download-current-version --force-download --repack --compression xz
\ No newline at end of file

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



More information about the pkg-java-commits mailing list