forked from apereo/cas-overlay-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
175 lines (154 loc) · 6.01 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
import org.apache.tools.ant.taskdefs.condition.*
import org.gradle.internal.logging.text.*
import org.apereo.cas.metadata.*
import java.nio.file.*
import static org.gradle.internal.logging.text.StyledTextOutput.Style
buildscript {
repositories {
if (project.privateRepoUrl) {
maven {
url project.privateRepoUrl
credentials {
username = project.privateRepoUsername
password = System.env.PRIVATE_REPO_TOKEN
}
}
}
mavenLocal()
mavenCentral()
gradlePluginPortal()
maven {
url 'https://oss.sonatype.org/content/repositories/snapshots'
mavenContent { snapshotsOnly() }
}
maven {
url "https://repo.spring.io/milestone"
mavenContent { releasesOnly() }
}
}
dependencies {
classpath "org.springframework.boot:spring-boot-gradle-plugin:${project.springBootVersion}"
classpath "io.freefair.gradle:maven-plugin:${project.gradleFreeFairPluginVersion}"
classpath "io.freefair.gradle:lombok-plugin:${project.gradleFreeFairPluginVersion}"
classpath "io.spring.gradle:dependency-management-plugin:${project.gradleDependencyManagementPluginVersion}"
classpath "com.google.cloud.tools:jib-gradle-plugin:${project.jibVersion}"
classpath "de.undercouch:gradle-download-task:${project.gradleDownloadTaskVersion}"
classpath "org.apereo.cas:cas-server-core-api-configuration-model:${project.'cas.version'}"
classpath "org.apereo.cas:cas-server-core-configuration-metadata-repository:${project.'cas.version'}"
}
}
repositories {
if (project.privateRepoUrl) {
maven {
url project.privateRepoUrl
credentials {
username = project.privateRepoUsername
password = System.env.PRIVATE_REPO_TOKEN
}
}
}
mavenLocal()
mavenCentral()
maven { url 'https://oss.sonatype.org/content/repositories/releases' }
maven {
url 'https://oss.sonatype.org/content/repositories/snapshots'
mavenContent { snapshotsOnly() }
}
maven {
url 'https://build.shibboleth.net/nexus/content/repositories/releases/'
mavenContent { releasesOnly() }
}
maven {
url "https://build.shibboleth.net/nexus/content/repositories/snapshots"
mavenContent { snapshotsOnly() }
}
maven {
url "https://repo.spring.io/milestone"
mavenContent { releasesOnly() }
}
}
apply plugin: "io.freefair.war-overlay"
apply plugin: "war"
apply plugin: "org.springframework.boot"
apply plugin: "io.freefair.lombok"
apply from: rootProject.file("gradle/springboot.gradle")
apply from: rootProject.file("gradle/jib.gradle")
apply from: rootProject.file("gradle/tasks.gradle")
configurations.all {
resolutionStrategy {
cacheChangingModulesFor 0, "seconds"
cacheDynamicVersionsFor 0, "seconds"
preferProjectModules()
def failIfConflict = project.hasProperty("failOnVersionConflict") && Boolean.valueOf(project.getProperty("failOnVersionConflict"))
if (failIfConflict) {
failOnVersionConflict()
}
}
exclude(group: "cglib", module: "cglib")
exclude(group: "cglib", module: "cglib-full")
exclude(group: "org.slf4j", module: "slf4j-log4j12")
exclude(group: "org.slf4j", module: "slf4j-simple")
exclude(group: "org.slf4j", module: "jcl-over-slf4j")
exclude(group: "org.apache.logging.log4j", module: "log4j-to-slf4j")
}
war {
entryCompression = ZipEntryCompression.STORED
enabled = false
}
sourceSets {
bootRunSources {
resources {
srcDirs new File("//etc/cas/templates/"), new File("${project.getProjectDir()}/src/main/resources/")
}
}
}
java {
toolchain {
languageVersion = JavaLanguageVersion.of(project.targetCompatibility)
}
}
bootBuildImage {
imageName = "${project.'containerImageOrg'}/${project.'containerImageName'}:${project.version}"
}
dependencies {
/**
* Do NOT modify the lines below or else you will risk breaking dependency management.
*/
implementation enforcedPlatform("org.apereo.cas:cas-server-support-bom:${project.'cas.version'}")
implementation platform(org.springframework.boot.gradle.plugin.SpringBootPlugin.BOM_COORDINATES)
/**
* CAS dependencies and modules may be listed here.
*
* There is no need to specify the version number for each dependency
* since versions are all resolved and controlled by the dependency management
* plugin via the CAS bom.
**/
/**
* Do NOT modify the lines below or else you will risk breaking the build.
*/
implementation "org.apereo.cas:cas-server-webapp"
implementation "org.apereo.cas:cas-server-support-ldap"
implementation "org.apereo.cas:cas-server-support-ldap-core"
implementation "org.apereo.cas:cas-server-support-json-service-registry"
implementation "org.apereo.cas:cas-server-support-script-engines"
implementation "org.apereo.cas:cas-server-support-oauth-webflow"
implementation "org.apereo.cas:cas-server-support-gauth"
/** implementation "org.apereo.cas:cas-server-core-notifications" **/
implementation "org.apereo.cas:cas-server-core-api-configuration-model"
implementation "org.apereo.cas:cas-server-webapp-init"
implementation 'org.webjars:webjars-locator:0.45'
implementation "org.webjars:bootstrap:5.1.3"
implementation "org.webjars:jquery:3.6.0"
implementation "org.webjars:font-awesome:6.1.1"
implementation 'org.webjars:jquery-ui:1.13.1'
if (project.hasProperty("casModules")) {
def dependencies = project.getProperty("casModules").split(",")
dependencies.each {
def projectsToAdd = rootProject.subprojects.findAll {project ->
project.name == "cas-server-core-${it}" || project.name == "cas-server-support-${it}"
}
projectsToAdd.each {implementation it}
}
}
developmentOnly "org.springframework.boot:spring-boot-devtools:${project.springBootVersion}"
}