[Git][java-team/gradle][master] 5 commits: Added a hook in MavenResolver to resolve the artifacts from the system repository
Emmanuel Bourg
gitlab at salsa.debian.org
Sun Sep 16 11:19:32 BST 2018
Emmanuel Bourg pushed to branch master at Debian Java Maintainers / gradle
Commits:
c4d40d78 by Emmanuel Bourg at 2018-09-16T08:57:24Z
Added a hook in MavenResolver to resolve the artifacts from the system repository
- - - - -
7a24a90e by Emmanuel Bourg at 2018-09-16T08:58:15Z
Standards-Version updated to 4.2.1
- - - - -
bc9359cb by Emmanuel Bourg at 2018-09-16T08:58:24Z
Use salsa.debian.org Vcs-* URLs
- - - - -
31598b8f by Emmanuel Bourg at 2018-09-16T10:18:33Z
Build depend on default-jdk instead of default-jdk-headless (Closes: #896436)
- - - - -
06a86793 by Emmanuel Bourg at 2018-09-16T10:18:51Z
Upload to unstable
- - - - -
6 changed files:
- debian/changelog
- debian/control
- + debian/patches/gradle-debian-helper-hook.patch
- debian/patches/series
- debian/rules
- debian/watch
Changes:
=====================================
debian/changelog
=====================================
@@ -1,3 +1,15 @@
+gradle (3.4.1-8) unstable; urgency=medium
+
+ * Team upload.
+ * Added a hook in MavenResolver to resolve the artifacts from the system
+ repository
+ * Build depend on default-jdk instead of default-jdk-headless
+ (Closes: #896436)
+ * Standards-Version updated to 4.2.1
+ * Use salsa.debian.org Vcs-* URLs
+
+ -- Emmanuel Bourg <ebourg at apache.org> Sun, 16 Sep 2018 12:18:43 +0200
+
gradle (3.4.1-7) unstable; urgency=medium
* Team upload.
=====================================
debian/control
=====================================
@@ -8,7 +8,7 @@ Build-Depends: ant,
checkstyle,
debhelper (>= 11),
default-jdk-doc,
- default-jdk-headless | default-jdk (>= 2:1.7),
+ default-jdk (>= 2:1.7),
dh-exec,
docbook-xsl,
gradle (>= 2.13),
@@ -75,9 +75,9 @@ Build-Depends: ant,
maven-repo-helper,
pandoc,
testng
-Standards-Version: 4.1.4
-Vcs-Git: https://anonscm.debian.org/git/pkg-java/gradle.git
-Vcs-Browser: https://anonscm.debian.org/cgit/pkg-java/gradle.git
+Standards-Version: 4.2.1
+Vcs-Git: https://salsa.debian.org/java-team/gradle.git
+Vcs-Browser: https://salsa.debian.org/java-team/gradle
Homepage: http://gradle.org
Package: gradle
=====================================
debian/patches/gradle-debian-helper-hook.patch
=====================================
@@ -0,0 +1,41 @@
+Description: Adds a hook in MavenResolver to resolve the artifacts from the system repository
+Author: Emmanuel Bourg <ebourg at apache.org>
+Forwarded: not-needed
+--- a/subprojects/dependency-management/src/main/java/org/gradle/api/internal/artifacts/repositories/resolver/MavenResolver.java
++++ b/subprojects/dependency-management/src/main/java/org/gradle/api/internal/artifacts/repositories/resolver/MavenResolver.java
+@@ -91,6 +91,35 @@
+ }
+
+ protected void doResolveComponentMetaData(ModuleComponentIdentifier moduleComponentIdentifier, ComponentOverrideMetadata prescribedMetaData, BuildableModuleComponentMetaDataResolveResult result) {
++ if (getRoot().toString().contains("/usr/share/maven-repo")) {
++ // Debian system repository detected, call the gradle-debian-helper
++ // hook if available to rewrite the dependencies on the fly
++ try {
++ Class resolverHookClass = Class.forName("org.debian.gradle.plugin.MavenResolverHook");
++ Object hook = resolverHookClass.getMethod("getInstance").invoke(null);
++ java.lang.reflect.Method rewrite = resolverHookClass.getMethod("rewrite", String.class, String.class, String.class, String.class, String.class);
++
++ String groupId = moduleComponentIdentifier.getGroup();
++ String artifactId = moduleComponentIdentifier.getModule();
++ String version = moduleComponentIdentifier.getVersion();
++ String classifier = null;
++ String type = "jar";
++ if (!prescribedMetaData.getArtifacts().isEmpty()) {
++ IvyArtifactName ivyArtifactName = prescribedMetaData.getArtifacts().iterator().next();
++ classifier = ivyArtifactName.getClassifier();
++ type = ivyArtifactName.getType();
++ }
++ java.util.Map<String, String> dependency = (java.util.Map<String, String>) rewrite.invoke(hook, groupId, artifactId, version, type, classifier);
++ if (dependency != null) {
++ moduleComponentIdentifier = new DefaultModuleComponentIdentifier(dependency.get("groupId"), dependency.get("artifactId"), dependency.get("version"));
++ prescribedMetaData = new org.gradle.internal.component.model.DefaultComponentOverrideMetadata();
++ prescribedMetaData.getArtifacts().add(new DefaultIvyArtifactName(dependency.get("artifactId"), dependency.get("type"), dependency.get("type"), dependency.get("classifier")));
++ }
++ } catch (Throwable t) {
++ System.out.println("\tCouldn't resolve system dependency:");
++ t.printStackTrace();
++ }
++ }
+ if (isNonUniqueSnapshot(moduleComponentIdentifier)) {
+ MavenUniqueSnapshotModuleSource uniqueSnapshotVersion = findUniqueSnapshotVersion(moduleComponentIdentifier, result);
+ if (uniqueSnapshotVersion != null) {
=====================================
debian/patches/series
=====================================
@@ -1,3 +1,4 @@
+gradle-debian-helper-hook.patch
33_scala_zinc.diff
search_system_jar.diff
relax_warnings.diff
=====================================
debian/rules
=====================================
@@ -54,9 +54,6 @@ override_dh_install:
rm debian/gradle-doc/usr/share/doc/gradle/dsl/dsl-standalone.html
rm debian/gradle-doc/usr/share/doc/gradle/dsl/sidebar.js
-get-orig-source:
- uscan --download-current-version --force-download --repack --compression xz
-
# since gradle build-depends on itself, a way to generate a deb from upstream
# binary distribution is provided with this target. With the resulting .deb,
# gradle can be rebuilt from source.
=====================================
debian/watch
=====================================
@@ -1,2 +1,3 @@
version=4
-http://services.gradle.org/distributions /distributions/@PACKAGE at -([\d\.]+)-src at ARCHIVE_EXT@
\ No newline at end of file
+opts="repack,compression=xz" \
+http://services.gradle.org/distributions /distributions/@PACKAGE at -([\d\.]+)-src at ARCHIVE_EXT@
View it on GitLab: https://salsa.debian.org/java-team/gradle/compare/ee3cfdcb7eec6c3ba8f9f13cdc9abc21dfd67d40...06a867934000f614c36dc63314a6940257007765
--
View it on GitLab: https://salsa.debian.org/java-team/gradle/compare/ee3cfdcb7eec6c3ba8f9f13cdc9abc21dfd67d40...06a867934000f614c36dc63314a6940257007765
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-java-commits/attachments/20180916/8ecca1f7/attachment.html>
More information about the pkg-java-commits
mailing list