forked from chrisdavecm/cmc-ccd-domain
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
135 lines (116 loc) · 3.19 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
buildscript {
dependencies {
classpath group: 'org.yaml', name: 'snakeyaml', version: '1.25'
}
}
plugins {
id 'java'
id 'maven'
id 'maven-publish'
id 'checkstyle'
id 'java-library'
id 'jacoco'
id 'com.jfrog.bintray' version "1.8.4"
id 'io.spring.dependency-management' version '1.0.6.RELEASE'
id 'org.springframework.boot' version '2.1.3.RELEASE' apply false
id 'org.owasp.dependencycheck' version '5.2.2'
id 'com.github.ben-manes.versions' version '0.27.0'
id 'org.sonarqube' version '3.0'
}
def fileVersion = new org.yaml.snakeyaml.Yaml().load(new File("VERSION.yaml").newInputStream())
group = 'uk.gov.hmcts.reform'
version = fileVersion.TAG
sourceCompatibility = 1.8
targetCompatibility = 1.8
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
repositories {
maven { url "http://dl.bintray.com/hmcts/hmcts-maven/" }
mavenLocal()
jcenter()
}
dependencyManagement {
imports {
mavenBom org.springframework.boot.gradle.plugin.SpringBootPlugin.BOM_COORDINATES
}
}
dependencies {
annotationProcessor group: 'org.projectlombok', name: 'lombok', version: '1.18.10'
compile group: 'com.fasterxml.jackson.core', name: 'jackson-annotations'
compileOnly group: 'org.projectlombok', name: 'lombok', version: '1.18.6'
testCompile group: 'org.springframework.boot', name: 'spring-boot-starter-test'
}
jar {
manifest {
attributes 'Implementation-Title': project.name, 'Implementation-Version': project.version
}
}
checkstyle {
maxWarnings = 50
toolVersion = '8.14'
}
task printVersion {
doLast {
print project.version
}
}
def pomConfig = {
licenses {
license {
name "MIT License"
url "http://www.opensource.org/licenses/mit-license.php"
distribution "repo"
}
}
scm {
url "https://github.com/hmcts/cmc-ccd-domain"
}
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
artifacts {
archives sourcesJar
archives javadocJar
}
publishing {
publications {
Main(MavenPublication) {
from components.java
artifact sourcesJar
artifact javadocJar
groupId project.group
artifactId project.name
version project.version
pom.withXml {
def root = asNode()
root.appendNode('description', 'Domain associated with money claim in ccd')
root.appendNode('name', 'Money Claim CCD Domain')
root.appendNode('url', 'https://github.com/hmcts/cmc-ccd-domain')
root.children().last() + pomConfig
}
}
}
}
bintray {
user = System.getenv('BINTRAY_USER')
key = System.getenv('BINTRAY_KEY')
publications = ['Main']
publish = true
pkg {
repo = 'hmcts-maven'
name = project.name
userOrg = 'hmcts'
licenses = ['MIT']
vcsUrl = 'https://github.com/hmcts/cmc-ccd-domain'
version {
name = project.version
}
}
}