-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
59 lines (47 loc) · 1.51 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
apply plugin: 'java'
apply plugin: 'eclipse'
repositories {
mavenCentral()
}
compileJava.sourceCompatibility = '1.8'
sourceSets {
// make the testcases directory the default resources tree for the 'test' source set.
test.resources.srcDirs = ['src/test/testcases']
}
dependencies {
implementation 'commons-io:commons-io:2.4'
implementation 'commons-cli:commons-cli:1.3.1'
implementation 'com.thoughtworks.xstream:xstream:1.4.9'
implementation 'org.xmlunit:xmlunit-parent:2.2.1'
implementation 'org.xmlunit:xmlunit-core:2.2.1'
implementation 'org.xmlunit:xmlunit-matchers:2.2.1'
testImplementation 'junit:junit:4.12'
}
task prepareSubmission(type: Zip) {
description = "Prepare your solution for submission via Moodle"
def banner = "############################################################"
doFirst {
if(!project.hasProperty("GroupNumber") || GroupNumber == "_not_set_")
throw new GradleException("""${banner}
| Group number required for submission!
|
| Run this task as
| \$ gradle prepareSubmission -PGroupNumber=42
| or set your group number in the file 'gradle.properties'
|${banner}""".stripMargin())
archiveBaseName = "eicb-p1-submission-g${GroupNumber}"
}
outputs.dir('build/distributions')
from(sourceSets.main.java) {
include('mavlc/parsing/Parser.java')
into('src/main/java')
}
doLast {
println banner
println " Please submit"
println " " + project.relativePath(archivePath)
println " via Moodle"
println banner
}
}
apply from: 'scripts.gradle'