-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.gradle
172 lines (148 loc) · 5.14 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
buildscript {
println("Building with Bb API [${bbLearnVersion}] ");
repositories {
jcenter()
}
dependencies {
// Needed for pre-compiling the JSPs
classpath "com.bmuschko:gradle-tomcat-plugin:${gradleTomcatPluginVersion}"
}
}
plugins {
id 'nebula.lint' version '16.9.1'
}
allprojects {
apply plugin: "java"
apply plugin: "war"
apply plugin: "com.bmuschko.tomcat"
apply plugin: 'nebula.lint'
repositories {
mavenCentral()
maven {
url "https://maven.blackboard.com/content/repositories/releases/"
}
}
group = 'org.apereo.openequella.integration.blackboard'
version = artifactVersion
gradleLint.rules = ['all-dependency', 'dependency-parentheses', 'duplicate-dependency-class']
dependencies {
providedCompile( "blackboard.platform:bb-platform:${bbLearnVersion}" ) { transitive = false }
providedCompile( "blackboard.platform:bb-cms-admin:${bbLearnVersion}" ) { transitive = false }
providedCompile "javax.servlet:javax.servlet-api:${servletApiVersion}";
providedCompile "javax.servlet.jsp:javax.servlet.jsp-api:${jspApiVersion}";
compile group: 'commons-httpclient', name: 'commons-httpclient', version: '3.1'
compile group: 'log4j', name: 'log4j', version: '1.2.17'
compile group: 'log4j', name: 'log4j', version: '1.2.17'
compile group: 'org.apache.cxf', name: 'cxf-bundle', version: '2.7.18'
compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.9.6'
compile group: 'org.apache.struts', name: 'struts-taglib', version: '1.3.10'
compile group: 'org.jsoup', name: 'jsoup', version: '1.13.1'
// This dependency is used internally, and not exposed to consumers on their own compile classpath.
implementation 'com.google.guava:guava:23.0'
// Use JUnit test framework
testImplementation "junit:junit:${junitVersion}"
// Needed to precompile the JSPs.
tomcat "org.apache.tomcat.embed:tomcat-embed-core:${tomcatVersion}",
"org.apache.tomcat.embed:tomcat-embed-logging-juli:${tomcatVersion}",
"org.apache.tomcat.embed:tomcat-embed-jasper:${tomcatVersion}",
"blackboard.platform:bb-taglibs:${bbLearnVersion}",
"blackboard.platform:bb-platform:${bbLearnVersion}",
"javax.servlet:jstl:${jstlVersion}"
}
task buildWar (type: War, dependsOn: tomcatJasper) {
// Due to the tomcat embed and other deps being hardset on the classpath,
// we need to remove the unneeded ones. This is not as clean as hoped,
// but keeps out unwanted jars from the war.
classpath = classpath.filter { file ->
(
!file.name.startsWith('jetty-') &&
!file.name.startsWith('geronimo-') &&
!file.name.startsWith('spring-') &&
!file.name.startsWith('serializer-')
)
}
from 'build/jsps/org/apache/jsp' // include the pre-compiled JSPs
from ('src/main/manifests/bb-manifest-unresolved.xml'){ // set the B2 version and place in the war
filter{ it.replaceAll('@VERSION@', artifactVersion)}
rename { String fileName ->
fileName.replace("-unresolved", "")
}
into("WEB-INF")
}
from ('src/main/properties/version-unresolved.properties'){ // set the B2 version and place in the war
filter{ it.replaceAll('@VERSION@', artifactVersion)}
rename { String fileName ->
fileName.replace("-unresolved", "")
}
into(".")
}
from ('src/main/java/icons.xml') {
into("WEB-INF/classes")
}
}
tomcat {
jasper {
validateXml = true
outputDir = file("build/jsps")
}
}
}
project(':oeqAuditB2') {
dependencies {
compile project(':oeqCommon')
}
task buildB2() {
group 'oEQ'
description 'Precompiles the JSPs, compiles the source, and packages the building block as a WAR'
dependsOn buildWar
}
}
project(':oeqPrimaryB2') {
dependencies {
compile project(':oeqCommon')
}
task buildB2() {
group 'oEQ'
description 'Precompiles the JSPs, compiles the source, and packages the building block as a WAR'
dependsOn buildWar
}
}
project(':oeqLinkMigrationLTI') {
dependencies {
compile project(':oeqCommon')
}
task buildLinkMigration() {
group 'oEQ'
description 'Precompiles the JSPs, compiles the source, and packages the building block as a WAR'
dependsOn clean, test, buildWar
}
}
project(':oeqPrimaryWS') {
dependencies {
compile project(':oeqCommon')
}
task generateJavadoc(type: Javadoc) {
source = sourceSets.main.allJava
}
task zipJavadoc(type: Zip, dependsOn: generateJavadoc) {
archiveName 'documentation.zip'
destinationDir buildDir
from ("${buildDir}/docs/javadoc") {
into 'documentation'
}
}
task buildWS(type: Jar) {
dependsOn classes
dependsOn zipJavadoc
group 'oEQ'
description 'Compiles the source and packages the web service as a JAR'
baseName = 'oeq-blackboard-primary-ws'
with jar
from (project(':oeqCommon').sourceSets.main.output) // Include the common classes as well.
from ('src/main/manifests/bb-manifest.xml'){ // set the B2 version and place in the war
into("META-INF")
}
from ('src/main/java/icons.xml')
from ("${buildDir}/documentation.zip")
}
}