Port to Gradle 2.3

This commit is contained in:
Mikolaj Izdebski 2015-03-25 10:24:30 +01:00
parent 2995c55968
commit b2dde94338
2 changed files with 55 additions and 2 deletions

View File

@ -0,0 +1,47 @@
From bccb95235f4d177552820f752f20e44b4a00b91b Mon Sep 17 00:00:00 2001
From: Mikolaj Izdebski <mizdebsk@redhat.com>
Date: Wed, 25 Mar 2015 10:23:13 +0100
Subject: [PATCH] Port to Gradle 2.3
---
.../java/org/fedoraproject/xmvn/connector/gradle/GradleResolver.java | 3 ++-
xmvn-parent/pom.xml | 2 +-
2 files changed, 3 insertions(+), 2 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 af4d068..94a6119 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
@@ -36,6 +36,7 @@ import org.gradle.api.internal.artifacts.ivyservice.ivyresolve.ModuleComponentRe
import org.gradle.api.internal.artifacts.ivyservice.ivyresolve.parser.DescriptorParseContext;
import org.gradle.api.internal.artifacts.ivyservice.ivyresolve.parser.GradlePomModuleDescriptorParser;
import org.gradle.api.internal.artifacts.ivyservice.ivyresolve.parser.MetaDataParser;
+import org.gradle.api.internal.artifacts.ivyservice.ivyresolve.strategy.DefaultVersionSelectorScheme;
import org.gradle.api.internal.artifacts.repositories.ResolutionAwareRepository;
import org.gradle.api.internal.component.ArtifactType;
import org.gradle.internal.component.external.model.DefaultMavenModuleResolveMetaData;
@@ -207,7 +208,7 @@ public class GradleResolver
Path fakePom = fakePom( pomPath, id );
logger.debug( "Created fake POM: {}", fakePom );
- MetaDataParser parser = new GradlePomModuleDescriptorParser();
+ MetaDataParser parser = new GradlePomModuleDescriptorParser( new DefaultVersionSelectorScheme() );
MutableModuleComponentResolveMetaData metaData = parser.parseMetaData( this, fakePom.toFile() );
result.resolved( metaData );
diff --git a/xmvn-parent/pom.xml b/xmvn-parent/pom.xml
index 294d0ce..d971817 100644
--- a/xmvn-parent/pom.xml
+++ b/xmvn-parent/pom.xml
@@ -79,7 +79,7 @@
<atinjectVersion>1</atinjectVersion>
<ivyVersion>2.4.0</ivyVersion>
<jcommanderVersion>1.47</jcommanderVersion>
- <gradleVersion>2.2.1</gradleVersion>
+ <gradleVersion>2.3</gradleVersion>
<guiceVersion>3.2.5</guiceVersion>
<guavaVersion>18.0</guavaVersion>
<mavenInvokerVersion>2.1.1</mavenInvokerVersion>
--
2.1.0

View File

@ -4,7 +4,7 @@
Name: xmvn
Version: 2.3.2
Release: 3%{?dist}
Release: 4%{?dist}
Summary: Local Extensions for Apache Maven
License: ASL 2.0
URL: http://mizdebsk.fedorapeople.org/xmvn
@ -12,6 +12,8 @@ BuildArch: noarch
Source0: https://fedorahosted.org/released/%{name}/%{name}-%{version}.tar.xz
Patch0: 0001-Port-to-Gradle-2.3.patch
BuildRequires: maven >= 3.3
BuildRequires: maven-local
BuildRequires: beust-jcommander
@ -27,7 +29,7 @@ BuildRequires: xmlunit
BuildRequires: apache-ivy
BuildRequires: sisu-mojos
BuildRequires: junit
BuildRequires: gradle >= 2.2.1-2
BuildRequires: gradle >= 2.3
Requires: maven >= 3.2.5-2
Requires: xmvn-api = %{version}-%{release}
@ -150,6 +152,7 @@ This package provides %{summary}.
%prep
%setup -q
%patch0 -p1
%mvn_package :xmvn __noinstall
@ -300,6 +303,9 @@ end
%doc LICENSE NOTICE
%changelog
* Wed Mar 25 2015 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.3.2-4
- Port to Gradle 2.3
* Mon Mar 16 2015 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.3.2-3
- Build with Maven 3.3.0