-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuild.gradle
98 lines (85 loc) · 2.44 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
buildscript {
repositories {
mavenLocal()
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:1.2.2.RELEASE")
}
}
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: 'spring-boot'
apply plugin: 'maven-publish'
apply plugin: 'maven'
version = "2.4.2"
group = "org.cloudfoundry"
description = "Spring Boot project for creating Cloud Foundry service brokers"
archivesBaseName = "spring-boot-cf-service-broker"
ext {
springBootVersion = '1.2.2.RELEASE'
hibernateValidatorVersion = '5.1.0.Final'
jsonPathVersion = '0.9.1'
baseNameTests = "${project.archivesBaseName}-tests"
}
task testsJar(type: Jar) {
from sourceSets.test.output
baseName = baseNameTests
}
task sourcesJar(type: Jar, dependsOn:classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn:javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
repositories {
mavenCentral()
}
dependencies {
compile("org.springframework.boot:spring-boot-starter-web:${springBootVersion}")
compile("org.springframework.boot:spring-boot-starter-security:${springBootVersion}")
compile("org.hibernate:hibernate-validator:${hibernateValidatorVersion}")
testCompile("org.springframework.boot:spring-boot-starter-test:${springBootVersion}")
testCompile("com.jayway.jsonpath:json-path:${jsonPathVersion}")
}
publishing {
publications {
jar(MavenPublication) {
artifactId project.archivesBaseName
from components.java
}
test(MavenPublication) {
artifactId baseNameTests
artifact testsJar
}
sources(MavenPublication) {
artifact sourcesJar {
classifier "sources"
}
from components.java
}
javadoc(MavenPublication) {
artifact javadocJar {
classifier "javadoc"
}
from components.java
}
}
if (project.hasProperty("artifactory_contextUrl")) {
repositories {
maven {
credentials {
username "${artifactory_user}"
password "${artifactory_password}"
}
url "${artifactory_contextUrl}/libs-release-local"
}
}
}
}
task wrapper(type: Wrapper) {
gradleVersion = '2.0'
}