Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 60 lines (54 sloc) 2.017 kb
ebc156d + initial migration to Gradle
Costin Leau authored
1 apply plugin: 'maven'
2
ccc4098 upgrade to gradle 1.0-rc3 and SI 2.1.2
Costin Leau authored
3 ext.optionalDeps = []
4 ext.providedDeps = []
17f4000 + add generatePom task
Costin Leau authored
5
ccc4098 upgrade to gradle 1.0-rc3 and SI 2.1.2
Costin Leau authored
6 ext.optional = { optionalDeps << it }
7 ext.provided = { providedDeps << it }
ebc156d + initial migration to Gradle
Costin Leau authored
8
239fd1d align gradle build to spring framework
Costin Leau authored
9 install {
10 repositories.mavenInstaller {
11 customizePom(pom, project)
ebc156d + initial migration to Gradle
Costin Leau authored
12 }
13 }
14
239fd1d align gradle build to spring framework
Costin Leau authored
15 def customizePom(pom, gradleProject) {
16 pom.whenConfigured { generatedPom ->
17 // respect 'optional' and 'provided' dependencies
18 gradleProject.optionalDeps.each { dep ->
19 generatedPom.dependencies.find { it.artifactId == dep.name }?.optional = true
20 }
21 gradleProject.providedDeps.each { dep ->
22 generatedPom.dependencies.find { it.artifactId == dep.name }?.scope = 'provided'
ebc156d + initial migration to Gradle
Costin Leau authored
23 }
24
239fd1d align gradle build to spring framework
Costin Leau authored
25 // eliminate test-scoped dependencies (no need in maven central poms)
26 generatedPom.dependencies.removeAll { dep ->
27 dep.scope == 'test'
ebc156d + initial migration to Gradle
Costin Leau authored
28 }
29
239fd1d align gradle build to spring framework
Costin Leau authored
30 // add all items necessary for maven central publication
31 generatedPom.project {
32 name = gradleProject.description
33 description = gradleProject.description
34 url = 'http://github.com/SpringSource/spring-hadoop'
35 organization {
36 name = 'SpringSource'
37 url = 'http://www.springsource.org/spring-data/hadoop'
ebc156d + initial migration to Gradle
Costin Leau authored
38 }
239fd1d align gradle build to spring framework
Costin Leau authored
39 licenses {
40 license {
41 name 'The Apache Software License, Version 2.0'
42 url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
43 distribution 'repo'
44 }
ebc156d + initial migration to Gradle
Costin Leau authored
45 }
239fd1d align gradle build to spring framework
Costin Leau authored
46 scm {
47 url = 'http://github.com/SpringSource/spring-hadoop'
48 connection = 'scm:git:git://github.com/SpringSource/spring-hadoop'
49 developerConnection = 'scm:git:git://github.com/SpringSource/spring-hadoop'
50 }
51 developers {
52 developer {
53 id = 'costin'
54 name = 'Costin Leau'
55 email = 'cleau@vmware.com'
56 }
ebc156d + initial migration to Gradle
Costin Leau authored
57 }
58 }
59 }
60 }
Something went wrong with that request. Please try again.