-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
95 lines (74 loc) · 2.27 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
plugins {
id 'scala'
id 'idea'
id 'application'
}
application {
mainClassName = 'minesweeperlikegamepleasedontsuememichaelsoft.game.MinesweeperLikeGamePleaseDontSueMeMichaelsoft'
}
test {
useJUnitPlatform()
afterSuite { suite, result ->
result.exception?.printStackTrace()
}
}
ext {
scalaMajorVersion = '2.13'
scalaVersion = "${scalaMajorVersion}.6"
}
repositories {
flatDir {
dirs 'lib'
}
mavenCentral()
}
sourceSets.main.scala.srcDirs = ['src']
sourceSets.test.scala.srcDirs = ['test']
dependencies {
implementation "org.scala-lang:scala-library:2.13.6"
compile fileTree(include: ['*.jar'], dir: 'lib')
testImplementation('junit:junit:4.13.2')
testCompile('org.junit.vintage:junit-vintage-engine:5.7.2')
testCompile "org.scalatest:scalatest_${scalaMajorVersion}:3.0.9"
compile "org.scalacheck:scalacheck_${scalaMajorVersion}:1.14.3"
}
task zip(type: Zip) {
group = "prepareZipForSubmit"
description = "Zip your code for submission to Codegrade"
// To make sure you can always run this task
outputs.upToDateWhen { false }
dependsOn assemble
from fileTree(dir: '.')
// include 'src/minesweeperlikegamepleasedontsuememichaelsoft/logic/**.scala'
include '*'
archiveFileName = 'minesweeper.zip'
destinationDir(file("$projectDir"))
}
task test3_1(type: Test) {
description="Run tests for assignment 3.1 (tetris)"
filter {
includeTestsMatching "tetris.TetrisTestSuite3_1"
}
}
task test3(type: Test) {
description="Run tests for assignment 3 (tetris)"
filter {
includeTestsMatching "tetris.TetrisTestSuite3"
}
}
task fraction3_1(type: JavaExec, dependsOn: classes) {
// To make sure you can always run this task
outputs.upToDateWhen { false }
main = 'infrastructure.ReportFraction3_1'
classpath sourceSets.test.runtimeClasspath
classpath sourceSets.main.runtimeClasspath
classpath configurations.runtime
}
task fraction3(type: JavaExec, dependsOn: classes) {
// To make sure you can always run this task
outputs.upToDateWhen { false }
main = 'infrastructure.ReportFraction3'
classpath sourceSets.test.runtimeClasspath
classpath sourceSets.main.runtimeClasspath
classpath configurations.runtime
}