-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
133 lines (113 loc) · 3.65 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
plugins {
id 'checkstyle'
id 'jacoco'
id 'java'
id 'maven-publish'
id "org.owasp.dependencycheck" version "9.2.0"
id "org.sonarqube" version "5.0.0.4638"
}
group 'com.docutools'
version = '6.0.0'
java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
}
repositories {
mavenCentral()
maven {
url = uri("https://maven.pkg.github.com/dds-gmbh/poipath")
credentials {
username = project.findProperty("gpr.gh.user") ?: System.getenv("GITHUB_USERNAME")
password = project.findProperty("gpr.gh.token") ?: System.getenv("GITHUB_TOKEN")
}
}
}
def apachePOIVersion = '5.3.0'
def log4jVersion = '2.23.1'
dependencies {
implementation('commons-beanutils:commons-beanutils:1.9.4')
implementation("org.apache.poi:poi:$apachePOIVersion")
implementation("org.apache.poi:poi-ooxml:$apachePOIVersion")
implementation("org.apache.poi:poi-ooxml-lite:$apachePOIVersion")
implementation("com.google.code.gson:gson:2.10.1")
implementation("org.apache.tika:tika-core:2.9.2")
runtimeOnly("org.apache.logging.log4j:log4j-core:$log4jVersion")
implementation("org.apache.logging.log4j:log4j-api:$log4jVersion")
implementation 'com.codepoetics:protonpack:1.16'
implementation 'com.google.guava:guava:33.2.0-jre'
implementation 'io.github.jbock-java:either:1.5.2'
testImplementation 'org.junit.jupiter:junit-jupiter:5.11.0-M1'
testImplementation("org.hamcrest:hamcrest:2.2")
testImplementation("com.docutools:poipath:2.0.0")
}
tasks.withType(Checkstyle) {
ignoreFailures = false
maxWarnings = 0 // Maximum number of warnings allowed
reports {
html.outputLocation = rootProject.file("build/reports/checkstyle.html")
}
}
dependencyCheck {
format = 'ALL'
junitFailOnCVSS = 6.0
failBuildOnCVSS = 6.0
suppressionFile = 'config/dependency-check/suppression.xml'
}
java {
withSourcesJar()
withJavadocJar()
}
javadoc {
failOnError = false
}
test {
useJUnitPlatform()
}
tasks.register('automatedTests', Test) {
testClassesDirs = testing.suites.test.sources.output.classesDirs
classpath = testing.suites.test.sources.runtimeClasspath
environment 'DT_JT_RR_PLACEHOLDER_MAPPINGS', 'src/test/resources/mappings.txt'
useJUnitPlatform {
includeTags 'automated'
}
}
publishing {
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/DDS-GmbH/jocument")
credentials {
username = project.findProperty("gpr.gh.user") ?: System.getenv("GITHUB_USERNAME")
password = project.findProperty("gpr.gh.token") ?: System.getenv("GITHUB_TOKEN")
}
}
}
publications {
gpr(MavenPublication) {
from(components.java)
}
}
}
sonarqube {
properties {
property "sonar.projectKey", "jocument"
property "sonar.organization", "docu-tools"
property "sonar.host.url", "https://sonarcloud.io"
property "sonar.sourceEncoding", "UTF-8"
property "sonar.verbose", "true"
property "sonar.sources", "src/main/java/"
property "sonar.language", "java"
property "sonar.java.binaries", "."
property "sonar.coverage.jacoco.xmlReportPaths", "build/reports/jacoco/jacocoAutomatedTestReport/jacocoAutomatedTestReport.xml"
property "sonar.qualitygate.wait", "true"
property "sonar.qualitygate.timeout", "180"
}
}
task jacocoAutomatedTestReport(type: JacocoReport) {
sourceSets sourceSets.main
executionData automatedTests
reports {
xml.getRequired().set(true)
}
}