Port to Gradle 4.3.1

This commit is contained in:
Michael Simacek 2017-11-13 14:47:35 +02:00
parent 8ea9c729df
commit 093317529a
2 changed files with 69 additions and 2 deletions

View File

@ -0,0 +1,62 @@
From cd6cf796f7c2230c940f95f46dc905a25152c486 Mon Sep 17 00:00:00 2001
From: Michael Simacek <msimacek@redhat.com>
Date: Fri, 10 Nov 2017 15:13:45 +0200
Subject: [PATCH] Port to Gradle 4.3.1
---
.../java/org/fedoraproject/xmvn/connector/gradle/GradleResolver.java | 2 +-
.../java/org/fedoraproject/xmvn/connector/gradle/XMvnInstallTask.java | 4 ++--
xmvn-parent/pom.xml | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/xmvn-connector-gradle/src/main/java/org/fedoraproject/xmvn/connector/gradle/GradleResolver.java b/xmvn-connector-gradle/src/main/java/org/fedoraproject/xmvn/connector/gradle/GradleResolver.java
index 6305aa86..9e1a247a 100644
--- a/xmvn-connector-gradle/src/main/java/org/fedoraproject/xmvn/connector/gradle/GradleResolver.java
+++ b/xmvn-connector-gradle/src/main/java/org/fedoraproject/xmvn/connector/gradle/GradleResolver.java
@@ -226,7 +226,7 @@ public class GradleResolver
ModuleVersionIdentifier mvi =
moduleIdentifierFactory.moduleWithVersion( id.getGroup(), id.getModule(), id.getVersion() );
MutableModuleComponentResolveMetadata metaData =
- new DefaultMutableMavenModuleResolveMetadata( mvi, id, request.getArtifacts() );
+ DefaultMutableMavenModuleResolveMetadata.missing( mvi, id );
result.resolved( metaData.asImmutable() );
return;
}
diff --git a/xmvn-connector-gradle/src/main/java/org/fedoraproject/xmvn/connector/gradle/XMvnInstallTask.java b/xmvn-connector-gradle/src/main/java/org/fedoraproject/xmvn/connector/gradle/XMvnInstallTask.java
index 07905f1f..d220e266 100644
--- a/xmvn-connector-gradle/src/main/java/org/fedoraproject/xmvn/connector/gradle/XMvnInstallTask.java
+++ b/xmvn-connector-gradle/src/main/java/org/fedoraproject/xmvn/connector/gradle/XMvnInstallTask.java
@@ -116,7 +116,7 @@ class XMvnInstallTask
} ).collect( Collectors.toList() );
}
- private void deploy( PublishArtifact gradleArtifact, Set<ModuleDependency> dependencies )
+ private void deploy( PublishArtifact gradleArtifact, Set<? extends ModuleDependency> dependencies )
{
DeploymentRequest request = new DeploymentRequest();
@@ -170,7 +170,7 @@ class XMvnInstallTask
for ( UsageContext usage : internalComponent.getUsages() )
{
- Set<ModuleDependency> dependencies = usage.getDependencies();
+ Set<? extends ModuleDependency> dependencies = usage.getDependencies();
for ( PublishArtifact artifact : usage.getArtifacts() )
{
diff --git a/xmvn-parent/pom.xml b/xmvn-parent/pom.xml
index 7e7a6d94..910e27b6 100644
--- a/xmvn-parent/pom.xml
+++ b/xmvn-parent/pom.xml
@@ -84,7 +84,7 @@
<atinjectVersion>1</atinjectVersion>
<ivyVersion>2.4.0</ivyVersion>
<jcommanderVersion>1.64</jcommanderVersion>
- <gradleVersion>4.2.1</gradleVersion>
+ <gradleVersion>4.3.1</gradleVersion>
<groovyVersion>2.4.10</groovyVersion>
<mavenInvokerVersion>2.2</mavenInvokerVersion>
<mavenResolverVersion>1.0.3</mavenResolverVersion>
--
2.13.6

View File

@ -10,7 +10,7 @@
Name: xmvn
Version: 3.0.0
Release: 7%{?dist}
Release: 8%{?dist}
Summary: Local Extensions for Apache Maven
License: ASL 2.0
URL: https://fedora-java.github.io/xmvn/
@ -20,6 +20,7 @@ Source0: https://github.com/fedora-java/xmvn/releases/download/%{version}
Patch0: 0001-Fix-installer-plugin-loading.patch
Patch1: 0001-Port-to-Gradle-4.2.patch
Patch2: 0001-Port-to-Gradle-4.3.1.patch
BuildRequires: maven >= 3.5.0
BuildRequires: maven-local
@ -41,7 +42,7 @@ BuildRequires: plexus-containers-container-default
BuildRequires: plexus-containers-component-annotations
BuildRequires: plexus-containers-component-metadata
%if %{with gradle}
BuildRequires: gradle >= 2.5
BuildRequires: gradle >= 4.3.1
%endif
Requires: %{name}-minimal = %{version}-%{release}
@ -191,6 +192,7 @@ This package provides %{summary}.
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
# Bisect IT has no chances of working in local, offline mode, without
# network access - it needs to access remote repositories.
@ -341,6 +343,9 @@ cp -P ${maven_home}/bin/m2.conf %{buildroot}%{_datadir}/%{name}/bin/
%doc LICENSE NOTICE
%changelog
* Fri Nov 10 2017 Michael Simacek <msimacek@redhat.com> - 3.0.0-8
- Port to Gradle 4.3.1
* Mon Oct 02 2017 Michael Simacek <msimacek@redhat.com> - 3.0.0-7
- Port to gradle 4.2