forked from bmatthias/config-builder
-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathbuild.gradle
More file actions
125 lines (110 loc) · 4.05 KB
/
Copy pathbuild.gradle
File metadata and controls
125 lines (110 loc) · 4.05 KB
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
plugins {
id 'java'
id 'jacoco'
id 'maven-publish'
id 'org.owasp.dependencycheck' version '12.2.2'
id 'io.github.gradle-nexus.publish-plugin' version '2.0.0' apply false
}
group = 'com.tngtech.java'
version = '1.8.3-SNAPSHOT'
description = 'The Config Builder creates fully configured instances of config classes, using values from various sources like properties files, command line arguments etc.'
java {
toolchain {
languageVersion = JavaLanguageVersion.of(project.hasProperty('javaLanguageVersion') ? project.property('javaLanguageVersion') : 8)
}
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
withJavadocJar()
withSourcesJar()
}
repositories {
mavenCentral()
}
dependencies {
implementation 'commons-cli:commons-cli:1.11.0'
implementation 'com.google.guava:guava:33.6.0-jre'
implementation 'org.hibernate.validator:hibernate-validator:6.2.5.Final'
implementation 'org.glassfish:jakarta.el:3.0.4'
implementation 'com.tngtech.java:property-loader:1.5.2'
implementation 'org.reflections:reflections:0.10.2'
implementation 'org.slf4j:slf4j-api:2.0.18'
testImplementation 'org.assertj:assertj-core:3.27.7'
testImplementation 'org.junit.jupiter:junit-jupiter:5.14.4'
testImplementation 'org.mockito:mockito-junit-jupiter:4.11.0'
testImplementation 'org.slf4j:slf4j-reload4j:2.0.18'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
}
test {
useJUnitPlatform()
}
jacocoTestReport {
dependsOn test
reports {
xml.required = true
}
}
dependencyCheck {
nvd.setApiKey(project.findProperty('nvdApiKey'))
analyzers.ossIndex.setUsername(project.findProperty('ossindexUsername'))
analyzers.ossIndex.setPassword(project.findProperty('ossindexPassword'))
failBuildOnCVSS = 5
}
publishing {
publications {
mavenJava(MavenPublication) {
artifactId = 'config-builder'
from components.java
pom {
name = 'Config-Builder'
description = project.description
url = 'https://github.com/TNG/config-builder'
organization {
name = 'TNG Technology Consulting'
url = 'https://www.tngtech.com/'
}
licenses {
license {
name = 'The Apache Software License, Version 2.0'
url = 'https://www.apache.org/licenses/LICENSE-2.0.txt'
distribution = 'repo'
}
}
developers {
developer {
name = 'Thomas Endres'
email = 'thomas.endres@tngtech.com'
organization = 'TNG Technology Consulting'
}
developer {
name = 'Manfred Hanke'
email = 'manfred.hanke@tngtech.com'
organization = 'TNG Technology Consulting'
}
}
scm {
url = 'https://github.com/TNG/config-builder'
connection = 'scm:git:git://github.com/TNG/config-builder.git'
developerConnection = 'scm:git:git://github.com/TNG/config-builder.git'
tag = 'HEAD'
}
}
}
}
}
if (project.hasProperty('sonatypeUsername') && project.hasProperty('sonatypePassword')) {
plugins.apply('signing')
plugins.apply('io.github.gradle-nexus.publish-plugin')
signing {
sign publishing.publications.mavenJava
useInMemoryPgpKeys(findProperty('signingKey'), findProperty('signingPassword'))
}
nexusPublishing {
repositories {
sonatype {
nexusUrl.set(uri('https://ossrh-staging-api.central.sonatype.com/service/local/'))
username = findProperty('sonatypeUsername')
password = findProperty('sonatypePassword')
}
}
}
}