-
Notifications
You must be signed in to change notification settings - Fork 13
/
build.gradle
193 lines (168 loc) · 5.68 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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
/*
* This file was generated by the Gradle 'init' task.
*
* This generated file contains a sample Java Library project to get you started.
* For more details take a look at the Java Libraries chapter in the Gradle
* User Manual available at https://docs.gradle.org/6.0/userguide/java_library_plugin.html
*/
plugins {
// Apply the java-library plugin to add support for Java Library
id 'java'
id 'jacoco'
id 'org.springframework.boot' version '3.1.5'
id 'io.spring.dependency-management' version '1.1.3'
id 'io.freefair.lombok' version '8.4'
id 'signing'
id 'maven-publish'
id "org.owasp.dependencycheck" version "8.4.2"
id "org.sonarqube" version "4.4.1.3373"
}
group = 'com.siliconmtn'
/*
* For snapshot publishing, use: version = n.n.n.n-SNAPSHOT
* For 'release' publishing, use: version = n.n.n
*
*/
//version = '2.0.4-SNAPSHOT'
version = '2.0.4'
archivesBaseName = "spacelibs-java"
configurations {
testImplementation{
extendsFrom compileOnly
}
compileOnly {
extendsFrom annotationProcessor
}
}
repositories {
// Use Maven Central for resolving dependencies.
// You can declare any Maven/Ivy/file repository here.
mavenCentral()
}
dependencies {
// ###### 'compileOnly' Dependencies: used internally, not exposed to consumers on their own compile classpath.
compileOnly 'com.googlecode.libphonenumber:libphonenumber:8.13.19'
compileOnly 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.15.2'
compileOnly 'org.apache.poi:poi:5.2.3'
// Spring Boot (Starters -> https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#using-boot-starter)
compileOnly 'org.springframework.boot:spring-boot-starter'
compileOnly 'org.springframework.boot:spring-boot-starter-web'
compileOnly 'org.springframework.boot:spring-boot-starter-data-jpa'
compileOnly 'org.springframework.boot:spring-boot-starter-aop'
compileOnly 'org.springframework.boot:spring-boot-starter-validation'
compileOnly 'org.springframework.boot:spring-boot-starter-mail'
compileOnly 'org.springframework.security:spring-security-crypto:6.1.3'
compileOnly 'org.hibernate:hibernate-validator:8.0.1.Final'
// XSS content validation/filtering
compileOnly 'org.owasp.encoder:encoder:1.2.3'
compileOnly 'org.jsoup:jsoup:1.16.1'
compileOnly 'com.auth0:java-jwt:4.4.0'
// ###### 'implementation' Dependencies: exposed to consumers (compile/runtime classpaths).
implementation 'commons-beanutils:commons-beanutils:1.9.4'
implementation 'commons-io:commons-io:2.13.0'
// - AWS Imports for the S3 Buckets
implementation 'software.amazon.awssdk:bom:2.19.8'
implementation 'software.amazon.awssdk:s3:2.19.8'
implementation 'software.amazon.awssdk:sns:2.19.8'
// ###### Testing
testImplementation 'org.springframework.security:spring-security-test'
testImplementation 'org.mockito:mockito-core:5.2.0'
testImplementation 'org.mockito:mockito-inline:5.2.0'
testImplementation('org.springframework.boot:spring-boot-starter-test'){
exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
}
//OpenAPI3 (Swagger)
compileOnly 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0'
// https://mvnrepository.com/artifact/org.apache.pulsar/pulsar-client
compileOnly 'org.apache.pulsar:pulsar-client:3.1.0'
testImplementation("org.junit.jupiter:junit-jupiter:5.9.2")
testRuntimeOnly('org.junit.platform:junit-platform-launcher:1.9.2')
}
// Prevent Spring Boot from looking for a main()
bootJar {
enabled = false
}
jar {
enabled = true
}
test {
finalizedBy jacocoTestReport // report is always generated after tests run
useJUnitPlatform()
}
jacocoTestReport {
reports {
xml.required = true
csv.required = false
html.required = true
}
dependsOn test
}
// Set the source path to the delombok source so the javadocs will be built properly
javadoc {
source = delombok.sourcepath
javadoc.options.addStringOption('Xdoclint:all', '-quiet')
options.tags = ["updates", "updates:"]
}
java {
sourceCompatibility = JavaVersion.VERSION_17
withJavadocJar()
withSourcesJar()
}
publishing {
publications {
spaceLibsJava(MavenPublication) {
artifactId = 'spacelibs-java'
from components.java
versionMapping {
usage('java-api') {
fromResolutionOf('runtimeClasspath')
}
usage('java-runtime') {
fromResolutionResult()
}
}
pom {
name = "spacelibs-java"
description = "A libary of useful tools and helper objects."
url = "https://github.com/smtadmin/spacelibs-java"
licenses {
license {
name = "MIT License"
url = "https://opensource.org/licenses/mit-license.php"
}
}
developers {
developer {
id = "etewa"
name = "James Camire"
email = "james@siliconmtn.com"
organization = "Silicon Mountain Technologies, Inc."
organizationUrl = "https://www.siliconmtn.com"
}
}
scm {
connection = "scm:git:git://github.com/smtadmin/spacelibs-java.git"
developerConnection = "scm:git:ssh://github.com:smtadmin/spacelibs-java.git"
url = "https://github.com/smtadmin/spacelibs-java/tree/main"
}
}
}
}
repositories {
maven {
credentials {
username project.ossrhUsername
password project.ossrhPassword
}
if (project.version.endsWith("-SNAPSHOT")) {
url = "https://oss.sonatype.org/content/repositories/snapshots/"
} else {
//url = "$buildDir/repos/releases"
url = "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
}
}
}
}
signing {
sign publishing.publications.spaceLibsJava
}