-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathbuild.gradle
115 lines (97 loc) · 3.36 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
plugins {
id 'java-library'
id 'maven-publish'
id "io.freefair.lombok" version "8.12.1"
}
def buildNumber = System.getenv("RELEASE_VERSION")?.replace("refs/tags/", "") ?: "DEV-SNAPSHOT"
group = 'uk.gov.hmcts.reform.auth'
version = buildNumber
java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
}
compileJava {
options.compilerArgs << '-parameters'
}
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
repositories {
mavenLocal()
mavenCentral()
}
dependencies {
api group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.18.2'
api group: 'org.apache.httpcomponents.client5', name: 'httpclient5', version: '5.4.2'
api group: 'io.jsonwebtoken', name: 'jjwt-api', version: '0.12.6'
api group: 'com.google.guava', name: 'guava', version: '33.4.0-jre'
api group: 'org.springframework.boot', name: 'spring-boot-autoconfigure', version: '3.4.2'
api group: 'org.springframework.boot', name: 'spring-boot-starter-security', version: '3.4.2'
api group: 'org.springframework.boot', name: 'spring-boot-starter-web', version: '3.4.2'
testImplementation group: 'org.wiremock', name: 'wiremock', version: '3.11.0'
testImplementation group: 'org.assertj', name: 'assertj-core', version: '3.27.3'
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter', version: '5.11.4'
testImplementation group: 'org.hamcrest', name: 'hamcrest', version: '3.0'
testImplementation group: 'org.mockito', name: 'mockito-core', version: '5.15.2'
testImplementation group: 'org.springframework.boot', name: 'spring-boot-starter-web', version: '3.4.2'
testImplementation group: 'org.springframework.boot', name: 'spring-boot-starter-test', version: '3.4.2'
compileOnly group: 'jakarta.servlet', name: 'jakarta.servlet-api', version: '6.1.0'
compileOnly group: 'com.github.spotbugs', name: 'spotbugs-annotations', version: '4.9.0'
}
test {
useJUnitPlatform()
}
jar {
manifest {
attributes 'Implementation-Title': project.name, 'Implementation-Version': project.version
}
}
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/auth-checker-lib"
}
}
task sourcesJar(type: Jar, dependsOn: classes) {
archiveClassifier = 'sources'
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc) {
archiveClassifier = 'javadoc'
from javadoc.destinationDir
}
artifacts {
archives sourcesJar
archives javadocJar
}
publishing {
publications {
Main(MavenPublication) {
from components.java
artifact sourcesJar
artifact javadocJar
groupId project.group
artifactId 'auth-checker-lib'
version project.version
pom.withXml {
def root = asNode()
root.appendNode('description', 'Client library for communicating with IDAM')
root.appendNode('name', 'IDAM Auth Checker Libary')
root.appendNode('url', 'https://github.com/hmcts/auth-checker-lib')
root.children().last() + pomConfig
}
}
}
}