-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.gradle
89 lines (74 loc) · 2.2 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
/*
* This file was generated by the Gradle 'init' task.
*/
plugins {
id 'java-library'
id 'maven-publish'
}
repositories {
mavenLocal()
mavenCentral()
}
dependencies {
implementation 'io.swagger:swagger-annotations:1.6.14'
implementation 'com.google.code.findbugs:jsr305:3.0.2'
api 'org.springframework.cloud:spring-cloud-starter-openfeign:4.1.3'
api 'org.springframework.cloud:spring-cloud-starter-oauth2:2.2.5.RELEASE'
api 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.16.0'
api 'org.openapitools:jackson-databind-nullable:0.2.6'
api 'org.hibernate.validator:hibernate-validator:8.0.1.Final'
testImplementation 'org.springframework.boot:spring-boot-starter-test:3.2.0'
}
group = '${{ values.group_id}}'
def buildNumber = System.getenv("RELEASE_VERSION")?.replace("refs/tags/", "") ?: "DEV-SNAPSHOT"
version buildNumber
description = '${{ values.description}}'
allprojects {
sourceCompatibility = 17
targetCompatibility = 17
}
def gitRepo = "https://github.com/hmcts/${{ values.app_full_name}}"
def pomConfig = {
licenses {
license {
name "MIT License"
url "https://opensource.org/licenses/MIT"
distribution "repo"
}
}
scm {
url gitRepo
}
}
tasks.register('sourcesJar', Jar) {
dependsOn classes
getArchiveClassifier().set('sources')
from sourceSets.main.allSource
}
tasks.register('javadocJar', Jar) {
dependsOn javadoc
getArchiveClassifier().set('javadoc')
from javadoc.destinationDir
}
publishing {
publications {
Main(MavenPublication) {
from components.java
artifact sourcesJar
artifact javadocJar
groupId project.group
artifactId '${{ values.artifact_id}}'
version project.version
pom.withXml {
def root = asNode()
root.appendNode('description', '${{ values.description}}')
root.appendNode('name', '${{ values.artifact_id}}')
root.appendNode('url', gitRepo)
root.children().last() + pomConfig
}
}
}
}
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}