forked from AtlasOfLivingAustralia/ala-cas-5-services
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
193 lines (172 loc) · 7.18 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
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://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 "gradle.plugin.com.google.cloud.tools:jib-gradle-plugin:${project.jibVersion}"
}
}
repositories {
if (project.privateRepoUrl) {
maven {
url project.privateRepoUrl
credentials {
username = project.privateRepoUsername
password = System.env.PRIVATE_REPO_TOKEN
}
}
}
maven { url "https://nexus.ala.org.au/content/groups/public/" }
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/' }
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 plugin: "maven-publish"
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()
}
}
}
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-mgmt-support-bom:${project.'casmgmt.version'}")
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.
**/
implementation "org.apereo.cas:cas-server-support-mongo-service-registry"
// implementation "org.apereo.cas:cas-server-support-session-mongo:${casVersion}"
implementation 'org.springframework.session:spring-session-data-mongodb:2.7.0'
implementation 'org.springframework.session:spring-session-core:2.7.0'
implementation 'org.springframework.data:spring-data-mongodb:3.4.8'
implementation 'org.mongodb:mongodb-driver-sync:4.6.0'
// implementation "org.apereo.cas:cas-mgmt-api-configuration:$casMgmtServerVersion"
runtimeOnly 'mysql:mysql-connector-java:8.0.28'
implementation "org.apereo.cas:cas-server-core-services-api"
compileOnly "org.apereo.cas:cas-mgmt-webapp-init"
compileOnly "org.apereo.cas:cas-mgmt-webapp-config"
// These deps are in the WAR overlay, but IntelliJ can not find them so
// they're replicated here.
// implementation "org.apereo.cas:cas-server-core-configuration"
// implementation "org.apereo.cas:cas-mgmt-config-authz"
// implementation "org.apereo.cas:cas-mgmt-config-audit"
// implementation "org.apereo.cas:cas-mgmt-core-authentication"
// implementation "org.apereo.cas:cas-mgmt-api-configuration"
// implementation "org.apereo.cas:cas-mgmt-support-register"
// implementation "org.apereo.cas:cas-mgmt-config-authentication"
// implementation "org.apereo.cas:cas-mgmt-config-search"
// implementation "org.apereo.cas:cas-mgmt-config-saml"
// implementation "org.apereo.cas:cas-mgmt-config-register"
// implementation "org.apereo.cas:cas-mgmt-support-search"
// implementation "org.apereo.cas:cas-mgmt-config-oauth"
// implementation "org.apereo.cas:cas-mgmt-config-dashboard"
// implementation "org.apereo.cas:cas-mgmt-support-dashboard"
// implementation "org.apereo.cas:cas-mgmt-support-oauth"
// implementation "org.apereo.cas:cas-mgmt-core-audit"
// implementation "org.apereo.cas:cas-mgmt-api-dashboard"
// implementation "org.apereo.cas:cas-mgmt-core-authz"
// implementation "org.apereo.cas:cas-mgmt-config-delegated"
// implementation "org.apereo.cas:cas-mgmt-support-delegated"
// implementation "org.apereo.cas:cas-mgmt-webapp-init"
// implementation "org.apereo.cas:cas-mgmt-support-saml"
// implementation "org.apereo.cas:cas-mgmt-api-core"
// implementation "org.apereo.cas:cas-mgmt-support-version-control"
compileOnly "org.apereo.cas:cas-mgmt-core"
// implementation "org.apereo.cas:cas-mgmt-config-version-control"
// implementation "org.apereo.cas:cas-mgmt-config-submissions"
// implementation "org.apereo.cas:cas-mgmt-config-core"
// implementation "org.apereo.cas:cas-mgmt-core-util"
// implementation "org.apereo.cas:cas-mgmt-support-submissions"
// implementation "org.apereo.cas:cas-mgmt-api-version-control"
developmentOnly "org.springframework.boot:spring-boot-devtools:${project.springBootVersion}"
}
publishing {
repositories {
maven {
name 'Nexus'
url "https://nexus.ala.org.au/content/repositories/${project.version.endsWith('-SNAPSHOT') ? 'snapshots' : 'releases' }"
credentials {
username = System.getenv('TRAVIS_DEPLOY_USERNAME')
password = System.getenv('TRAVIS_DEPLOY_PASSWORD')
}
}
}
publications {
mavenJar(MavenPublication) {
artifact bootWar
// from components.web
}
}
}