-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
129 lines (107 loc) · 3.28 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
buildscript {
repositories {
jcenter()
maven { url 'http:https://repo.spring.io/snapshot' }
maven { url "http:https://repo.spring.io/milestone" }
}
dependencies {
classpath "org.springframework.boot:spring-boot-gradle-plugin:1.4.2.RELEASE"
}
}
plugins {
id "ajk.gradle.consul" version "0.1.10"
id "com.jfrog.bintray" version "1.7.3"
}
apply plugin: 'java'
apply plugin: 'org.springframework.boot'
apply plugin: 'idea'
apply plugin: 'maven-publish'
group = "ajk.ghcache"
version = '0.0.2'
repositories {
jcenter()
maven { url "http:https://repo.spring.io/milestone" }
maven { url "http:https://dl.bintray.com/amirk/maven" }
}
dependencies {
compile "org.springframework.boot:spring-boot-starter-web"
compile "org.springframework.boot:spring-boot-starter-actuator"
compile "org.springframework.boot:spring-boot-starter-remote-shell"
compile "org.springframework.boot:spring-boot-configuration-processor"
compile "org.projectlombok:lombok:1.16.8"
compile "io.dropwizard.metrics:metrics-core:3.1.2"
compile "commons-io:commons-io:2.5"
compile "com.google.guava:guava:19.0"
compile "org.apache.httpcomponents:httpclient:4.5.2"
compile "org.apache.httpcomponents:httpmime:4.5.2"
compile "org.apache.httpcomponents:httpclient-cache:4.5.2"
compile "org.apache.httpcomponents:fluent-hc:4.5.2"
testCompile "org.springframework.boot:spring-boot-starter-test"
}
compileJava.dependsOn(processResources)
consul {
version = "0.7.2"
httpPort = 8500
dnsPort = 8600
consulDir = file("$rootProject.projectDir/gradle/tools/consul")
dataDir = file("$project.buildDir/consul/data")
configDir = file("$project.buildDir/consul/consul.d")
}
task wrapper(type: Wrapper) {
gradleVersion = "3.2.1"
}
def pomConfig = {
licenses {
license {
name "The Apache Software License, Version 2.0"
url "http:https://www.apache.org/licenses/LICENSE-2.0.txt"
distribution "repo"
}
}
}
publishing {
publications {
maven(MavenPublication) {
from components.java
artifact sourcesJar
artifact javadocJar
pom.withXml {
def root = asNode()
root.appendNode('description', 'an exercise in API caching demonstrated on GitHub')
root.children().last() + pomConfig
}
}
}
}
model {
tasks.generatePomFileForMavenPublication {
destination = file("$buildDir/libs/ghcache-${project.version}.pom")
}
}
bintray {
user = System.getenv("BINTRAY_USER")
key = System.getenv("BINTRAY_KEY")
publications = ['maven']
publish = true
pkg {
repo = 'maven'
name = 'ghcache'
websiteUrl = 'https://github.com/amirkibbar/ghcache'
issueTrackerUrl = 'https://github.com/amirkibbar/ghcache/issues'
vcsUrl = 'https://github.com/amirkibbar/ghcache.git'
licenses = ['Apache-2.0']
labels = ['ghcache']
version {
name = project.version
}
}
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from 'build/docs/javadoc'
}
task sourcesJar(type: Jar) {
from sourceSets.main.allSource
classifier = 'sources'
}
bintrayUpload.dependsOn = [sourcesJar, javadocJar]