-
Notifications
You must be signed in to change notification settings - Fork 29
Expand file tree
/
Copy pathbuild.gradle
More file actions
174 lines (154 loc) · 5.87 KB
/
build.gradle
File metadata and controls
174 lines (154 loc) · 5.87 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
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
buildscript {
ext {
springBootVersion = '4.0.4'
}
repositories {
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
}
}
plugins {
id 'com.github.node-gradle.node' version '7.1.0'
}
apply plugin: 'java'
apply plugin: 'eclipse-wtp'
apply plugin: 'org.springframework.boot'
apply plugin: 'war'
configurations {
providedRuntime
}
dependencies {
/*
* Notification API
*/
compile project(':notification-portlet-api')
/*
* Standard Dependencies
*/
compile "com.google.guava:guava:${guavaVersion}"
compile "com.jayway.jsonpath:json-path:${jsonPathVersion}"
compile "net.minidev:json-smart:${jsonSmartVersion}"
compile "commons-codec:commons-codec:${commonsCodecVersion}"
compile "commons-dbcp:commons-dbcp:${commonsDbcpVersion}"
compile "io.springfox:springfox-swagger2:${springfoxVersion}"
compile "io.springfox:springfox-swagger-ui:${springfoxVersion}"
compile "javax.servlet:jstl:${jstlVersion}"
compile "joda-time:joda-time:${jodaTimeVersion}"
compile "net.sf.dozer:dozer:${dozerVersion}"
compile "net.sf.dozer:dozer-spring:${dozerVersion}"
compile("org.ehcache:ehcache:${ehcacheVersion}")
compile "org.apache.commons:commons-lang3:${commonsLang3Version}"
compile "org.apache.httpcomponents:httpclient:${httpcomponentsVersion}"
compile "org.aspectj:aspectjweaver:${aspectjVersion}"
compile "org.codehaus.janino:janino:${janinoVersion}"
compile "org.hibernate:hibernate-core:${hibernateVersion}"
compile("org.hibernate:hibernate-ehcache:${hibernateVersion}") {
exclude group: 'net.sf.ehcache', module: 'ehcache-core'
}
compile "org.hibernate:hibernate-entitymanager:${hibernateVersion}"
compile "org.jasig.resourceserver:resource-server-utils:${resourceServerVersion}"
compile("org.jasig.portal:uPortal-soffit-renderer:${uPortalVersion}")
compile "org.jasig.portal:uPortal-spring:${uPortalVersion}@jar" // Use @jar classifier to exclude transitive dependencies
compile "org.jasypt:jasypt-spring31:${jasyptVersion}"
compile "org.springframework:spring-jdbc:${springVersion}"
compile "org.springframework:spring-orm:${springVersion}"
compile "org.springframework:spring-tx:${springVersion}"
compile "org.springframework:spring-webmvc-portlet:${springVersion}"
compile "org.springframework.security.oauth:spring-security-oauth2:${springSecurityOAuth2Version}"
compile "com.rometools:rome:${romeVersion}"
compileOnly "org.projectlombok:lombok:${lombokVersion}"
annotationProcessor "org.projectlombok:lombok:${lombokVersion}"
compile "javax.annotation:javax.annotation-api:${annotationApiVersion}"
compile "javax.xml.bind:jaxb-api:${jaxbApiVersion}"
/*
* Spring Boot
*/
compile('org.springframework.boot:spring-boot-starter-cache')
compile('org.springframework.boot:spring-boot-starter-security')
compile('org.springframework.boot:spring-boot-starter-web')
providedRuntime('org.springframework.boot:spring-boot-starter-tomcat')
testCompile('org.springframework.boot:spring-boot-starter-test')
/*
* Portlet API
*
* Needs to be present (and unused) when the project is run independantly; needs to be absent
* (but used) when the project is run inside Tomcat.
*/
compileOnly "${portletApiDependency}"
providedRuntime "${portletApiDependency}"
/*
* JDBC Driver JAR(s)
*
* These tend to be adopter-specific. Use an overlay process (e.g. uPortal-start) to include
* these with your project. Nevertheless, we will provide the current uPortal HSQLDB driver to
* the embedded Tomcat (Spring Boot) for when the project is started with bootRun.
*/
providedRuntime "org.hsqldb:hsqldb:${hsqldbVersion}"
}
node {
version = nodejsVersion
download = true
}
/*
* This task produces a .jar archive from this module, which is in addition to the primary .war
* archive. Adopters who with to extend the project may need this additional archive.
*/
task classesJar(type: Jar) {
from sourceSets.main.output
classifier 'jar'
}
artifacts {
archives classesJar
}
war {
from("${buildDir}/css") {
into('css')
}
from("${buildDir}/scripts") {
into('scripts')
}
}
task createCssAndJsOutputDirs(dependsOn: 'npm_ci') {
doLast {
mkdir "${buildDir}/css"
mkdir "${buildDir}/scripts"
}
}
// Handle CSS
project.tasks.getByName('npm_run_compile-less').dependsOn createCssAndJsOutputDirs
project.tasks.getByName('npm_run_minify-css').dependsOn 'npm_run_compile-less'
war.dependsOn 'npm_run_minify-css'
// Handle JS
project.tasks.getByName('npm_run_compile-js').dependsOn createCssAndJsOutputDirs
war.dependsOn 'npm_run_minify-js'
uploadArchives{
repositories {
mavenDeployer {
pom.project {
name 'notification-portlet-webapp'
packaging 'war'
// optionally artifactId can be defined here
description 'SR-286 (Portlet 2.0) portlet to display important notices from campus systems'
url 'https://github.com/Jasig/NotificationPortlet'
scm {
connection 'scm:git@github.com:Jasig/NotificationPortlet.git'
url 'https://github.com/Jasig/NotificationPortlet'
}
licenses {
license {
name 'The Apache License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
organization 'uPortal Developers'
organizationUrl 'https://github.com/Jasig/uPortal/graphs/contributors'
}
}
}
}
}
}