-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
123 lines (104 loc) · 2.9 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
plugins {
id 'java'
id 'maven-publish'
id 'com.github.hierynomus.license' version '0.16.1'
id 'jacoco'
id 'com.github.johnrengelman.shadow' version '7.1.2'
}
task generateXml(type:JavaExec) {
main = 'com.hubsante.model.XmlGenerator'
classpath = sourceSets.main.runtimeClasspath
}
group = 'com.hubsante'
java {
toolchain {
languageVersion = JavaLanguageVersion.of(8)
}
}
repositories {
mavenCentral()
}
dependencies {
implementation 'com.fasterxml.jackson.core:jackson-databind:2.15.2'
implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.15.2'
implementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-xml:2.15.2'
implementation 'javax.validation:validation-api:2.0.1.Final'
implementation 'jakarta.annotation:jakarta.annotation-api:1.3.5'
implementation 'com.networknt:json-schema-validator:1.0.87'
implementation 'org.projectlombok:lombok:1.18.22'
implementation 'org.junit.jupiter:junit-jupiter-params:5.8.2'
implementation 'com.google.guava:guava:32.1.3-jre'
implementation 'ch.qos.logback:logback-classic:1.3.8'
annotationProcessor 'org.projectlombok:lombok:1.18.22'
testImplementation 'junit:junit:4.13.2'
testImplementation 'org.junit.jupiter:junit-jupiter-engine:5.8.2'
testAnnotationProcessor 'org.projectlombok:lombok:1.18.22'
}
// I let this in the code waiting for use case explanation
//shadowJar {
// archiveClassifier.set('')
//}
jacocoTestReport {
reports {
html.required = true
xml.required = true
}
}
test {
if (project.hasProperty('technical')) {
include '**/*Technical*.class'
} else if (!project.hasProperty('allTests'))
exclude '**/*Technical*.class'
}
allprojects {
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
}
tasks.named('test') {
useJUnitPlatform()
finalizedBy jacocoTestReport
}
tasks.named('publish') {
configure {
dependsOn("test")
}
}
license {
header = file('LICENSE_HEADER.txt')
strictCheck = true
ext {
company = "Agence du Numerique en Sante (ANS)"
year = licenseYear()
}
mapping 'java', 'JAVADOC_STYLE'
include "**/*.java"
exclude "**/test/**"
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
}
}
repositories {
maven {
name = 'GitHubPackages'
url = 'https://maven.pkg.github.com/ansforge/SAMU-Hub-Modeles'
credentials {
username = System.getenv("GITHUB_ACTOR")
password = System.getenv("GITHUB_TOKEN")
}
}
}
}
static def licenseYear() {
def currentYear = new Date().format('yyyy')
def licenseYear
if (currentYear != "2023") {
licenseYear = "2023-" + currentYear
} else {
licenseYear = "2023"
}
return licenseYear
}