-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
87 lines (72 loc) · 2.1 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
/*
* 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.3'
implementation 'com.google.code.findbugs:jsr305:3.0.2'
api 'org.springframework.cloud:spring-cloud-starter-openfeign:3.0.5'
api 'org.springframework.cloud:spring-cloud-starter-oauth2:2.2.5.RELEASE'
api 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.13.0'
api 'org.openapitools:jackson-databind-nullable:0.2.1'
api 'org.hibernate.validator:hibernate-validator:6.0.16.Final'
testImplementation 'org.springframework.boot:spring-boot-starter-test:2.6.0'
}
group = 'uk.gov.hmcts'
def buildNumber = System.getenv("RELEASE_VERSION")?.replace("refs/tags/", "") ?: "DEV-SNAPSHOT"
version buildNumber
description = 'something'
allprojects {
sourceCompatibility = 11
targetCompatibility = 11
}
def gitRepo = "https://github.com/hmcts/platops-test"
def pomConfig = {
licenses {
license {
name "MIT License"
url "https://opensource.org/licenses/MIT"
distribution "repo"
}
}
scm {
url gitRepo
}
}
task sourcesJar(type: Jar, dependsOn: classes) {
getArchiveClassifier().set('sources')
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc) {
getArchiveClassifier().set('javadoc')
from javadoc.destinationDir
}
publishing {
publications {
Main(MavenPublication) {
from components.java
artifact sourcesJar
artifact javadocJar
groupId project.group
artifactId 'petstore'
version project.version
pom.withXml {
def root = asNode()
root.appendNode('description', 'something')
root.appendNode('name', 'petstore')
root.appendNode('url', gitRepo)
root.children().last() + pomConfig
}
}
}
}
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}