-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
150 lines (123 loc) · 3.62 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
buildscript {
repositories {
jcenter()
mavenCentral()
}
dependencies {
classpath "org.ajoberstar:gradle-git:1.3.2"
}
}
plugins {
id "com.jfrog.bintray" version "1.6"
}
apply plugin: 'java'
apply plugin: 'maven-publish'
apply plugin: 'org.ajoberstar.github-pages'
repositories {
mavenLocal()
jcenter()
maven { url "http://repo.spring.io/milestone" }
maven { url "https://bintray.com/artifact/download/orbitz/consul-client" }
}
dependencies {
compile "org.springframework.boot:spring-boot:1.3.3.RELEASE"
compile "org.springframework.boot:spring-boot-autoconfigure:1.3.3.RELEASE"
compile "org.springframework.retry:spring-retry:1.1.2.RELEASE"
compile "com.orbitz.consul:consul-client:0.9.4"
compile "dnsjava:dnsjava:2.1.7"
compile "commons-io:commons-io:2.4"
compile "org.projectlombok:lombok:1.16.4"
// the following are required to satisfy the orbitz consul client
compile "org.apache.cxf:cxf-rt-rs-client:3.0.3"
compile "org.apache.cxf:cxf-rt-transports-http-hc:3.0.3"
}
version = "0.2.1"
jar {
baseName = 'plum'
manifest {
attributes("Implementation-Title": "consul4spring (plum)",
"Implementation-version": project.version)
}
}
publishing {
publications {
maven(MavenPublication) {
groupId 'ajk.plum'
artifactId 'plum'
version project.version
pom.withXml {
asNode().children().last() + {
resolveStrategy = Closure.DELEGATE_FIRST
name 'plum'
inceptionYear "2015"
url "https://github.com/amirkibbar/plum"
licenses {
license {
name 'The Apache Software License, Version 2.0'
url 'http://www.apache.org/license/LICENSE-2.0.txt'
distribution 'repo'
}
}
}
}
from components.java
artifact sourcesJar {
classifier "sources"
}
artifact javadocJar {
classifier "javadoc"
}
}
}
}
model {
tasks.generatePomFileForMavenPublication {
destination = file("$buildDir/libs/plum-${project.version}.pom")
}
}
task install(dependsOn: 'publishMavenPublicationToMavenLocal') << {
logger.info "installing $project.name"
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
version = project.version
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
version = project.version
from javadoc.destinationDir
}
artifacts {
archives sourcesJar
archives javadocJar
}
bintray {
user = System.getenv("BINTRAY_USER")
key = System.getenv("BINTRAY_KEY")
publications = ['maven']
publish = true
pkg {
repo = 'maven'
name = 'consul4spring'
websiteUrl = 'https://github.com/amirkibbar/plum'
issueTrackerUrl = 'https://github.com/amirkibbar/plum/issues'
vcsUrl = 'https://github.com/amirkibbar/plum.git'
licenses = ['Apache-2.0']
labels = ['spring-boot', 'consul']
version {
name = project.version
}
}
}
bintrayUpload.dependsOn = [sourcesJar, javadocJar]
githubPages {
repoUri = "https://github.com/amirkibbar/plum.git"
pages {
from javadoc
}
}
task publishAll(dependsOn: [ bintrayUpload, publishGhPages]) << {}
task wrapper(type: Wrapper) {
gradleVersion = '2.12'
}