-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.gradle
84 lines (63 loc) · 2.21 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
import java.nio.file.Files
import java.nio.file.Paths
/*
* This build file was auto generated by running the Gradle 'init' task
* by 'wiley' at '2/11/14 9:16 PM' with Gradle 1.10
*
*/
apply plugin: 'java'
apply plugin: 'war'
sourceCompatibility = 1.7
targetCompatibility = 1.7
task wrapper(type: Wrapper) {
gradleVersion = "1.11"
}
if (isBuildingBlock()) {
version = getB2Version()
}
repositories {
mavenCentral()
maven {
url "https://bbprepo.blackboard.com/content/repositories/releases/"
}
}
configurations {
b2deploy
}
dependencies {
b2deploy 'org.oscelot:b2deploy-task:0.1.0'
compile 'org.slf4j:slf4j-api:1.7.5'
compile 'org.slf4j:jul-to-slf4j:1.7.5'
compile 'org.slf4j:slf4j-log4j12:1.7.5'
compile 'com.thoughtworks.xstream:xstream:1.4.7'
compile 'net.sourceforge.stripes:stripes:1.5.7'
compile 'org.springframework:spring-beans:3.2.5.RELEASE'
compile 'org.springframework:spring-web:3.2.5.RELEASE'
compile files('lib/bb-stripes-utils-1.1.0.jar')
compile files('lib/b2-config-utils-1.0.3.jar')
compile 'org.glassfish.jersey.containers:jersey-container-servlet:2.16'
compile 'org.glassfish.hk2:spring-bridge:2.3.0'
compile 'com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:2.5.1'
providedCompile 'javax.servlet:javax.servlet-api:3.0.1'
providedCompile 'jstl:jstl:1.2'
providedCompile 'blackboard.platform:bb-platform:9.1.201404.160205'
providedCompile 'blackboard.platform:bb-taglibs:9.1.201404.160205'
testCompile "junit:junit:4.11"
}
ant.taskdef(name: 'b2deploy', classname: 'org.oscelot.ant.B2DeployTask', classpath: configurations.b2deploy.asPath)
task deployb2(dependsOn: 'war') << {
println "Deploying \"" + war.archivePath + "\""
ant.b2deploy(localfilepath: war.archivePath,
host: 'localhost:9876',
clean: 'true',
courseorgavailable: 'true')
}
String getB2Version() {
File mfFile = new File(file(webAppDir), 'WEB-INF/bb-manifest.xml');
def manifest = new XmlSlurper().parse(mfFile);
return manifest.plugin.version['@value'];
}
boolean isBuildingBlock() {
File mfFile = new File(file(webAppDir), 'WEB-INF/bb-manifest.xml');
return mfFile.exists();
}