-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
70 lines (56 loc) · 2.42 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
import com.github.jengelman.gradle.plugins.shadow.transformers.Log4j2PluginsCacheFileTransformer
plugins {
id 'application'
// To use intellij
id 'idea'
// To make a self contained Jar file
id 'com.github.johnrengelman.shadow' version '7.1.2'
// Plugin to check your dependencies are up to date
id 'com.github.ben-manes.versions' version '0.44.0'
}
sourceCompatibility = 17
targetCompatibility = 17
application {
mainClass = 'com.github.daberkow.pac4j_oauth_tomcat_10_example.App'
}
def isNonStable = { String version ->
def stableKeyword = ['RELEASE', 'FINAL', 'GA'].any { it -> version.toUpperCase().contains(it) }
def regex = /^[0-9,.v-]+(-r)?$/
return !stableKeyword && !(version ==~ regex)
}
tasks.named("dependencyUpdates").configure {
rejectVersionIf {
isNonStable(it.candidate.version)
}
}
repositories {
// Use Maven Central for resolving dependencies.
mavenCentral()
}
// This is needed or you will fail to parse the log4j2.xml
shadowJar {
transform(Log4j2PluginsCacheFileTransformer)
}
dependencies {
// Use JUnit Jupiter for testing.
testImplementation 'org.junit.jupiter:junit-jupiter:5.9.1'
// Log4j for nicer logging
implementation group: 'org.apache.logging.log4j', name: 'log4j-api', version: '2.19.0'
implementation group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.19.0'
implementation group: 'org.apache.logging.log4j', name: 'log4j-web', version: '2.19.0'
implementation group: 'org.apache.logging.log4j', name: 'log4j-slf4j-impl', version: '2.19.0'
// Embedded Tomcat
implementation group: 'org.apache.tomcat.embed', name: 'tomcat-embed-core', version: '10.1.4'
implementation group: 'org.apache.tomcat.embed', name: 'tomcat-embed-jasper', version: '10.1.4'
implementation group: 'org.apache.tomcat', name: 'tomcat-jasper-el', version: '10.1.4'
implementation group: 'org.apache.tomcat', name: 'tomcat-jsp-api', version: '10.1.4'
implementation group: 'org.pac4j', name: 'pac4j-core', version: '5.7.0'
implementation group: 'org.pac4j', name: 'pac4j-oauth', version: '5.7.0'
implementation group: 'org.pac4j', name: 'pac4j-jakartaee', version: '5.7.0'
implementation group: 'com.google.code.gson', name: 'gson', version: '2.10'
implementation group: 'org.slf4j', name: 'slf4j-api', version: '2.0.6'
}
tasks.named('test') {
// Use JUnit Platform for unit tests.
useJUnitPlatform()
}