-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathbuild.gradle
More file actions
95 lines (73 loc) · 2.31 KB
/
build.gradle
File metadata and controls
95 lines (73 loc) · 2.31 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
plugins {
id 'scala'
id 'idea'
id 'application'
}
application {
mainClass.set( 'snake.game.SnakeGame')
}
ext {
scalaMajorVersion = '2.13'
scalaVersion = "${scalaMajorVersion}.16"
}
repositories {
mavenCentral()
maven {
url "https://jogamp.org/deployment/maven/"
}
maven {
url "https://jitpack.io"
}
}
sourceSets.main.scala.srcDirs = ['src']
sourceSets.test.scala.srcDirs = ['test']
dependencies {
implementation("org.processing:core:4.4.4")
implementation("org.jogamp.gluegen:gluegen-rt-main:2.5.0")
// https://mvnrepository.com/artifact/org.jogamp.gluegen/gluegen-rt
implementation("org.jogamp.gluegen:gluegen-rt:2.5.0")
implementation "org.scala-lang:scala-library:2.13.16"
testImplementation('junit:junit:4.13.2')
testImplementation("org.scala-lang:scala-reflect:2.13.16")
testImplementation("org.scalatest:scalatest_${scalaMajorVersion}:3.0.9")
}
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
dependsOn testClasses
from fileTree(dir: '.')
include 'src/snake/logic/**.scala'
archiveFileName = 'snake.zip'
destinationDirectory = layout.buildDirectory.dir("$projectDir")
}
task test2_1(type: Test) {
description="Run tests for assignment 2.1 (snake)"
filter {
includeTestsMatching "snake.SnakeTestsAssignment2_1"
}
}
task test2_3(type: Test) {
description="Run tests for assignment 2.3 (snake)"
filter {
includeTestsMatching "snake.SnakeTestsAssignment2_3"
}
}
task fraction2_1(type: JavaExec, dependsOn: classes) {
// To make sure you can always run this task
outputs.upToDateWhen { false }
mainClass.set('infrastructure.ReportFraction2_1')
classpath sourceSets.test.runtimeClasspath
classpath sourceSets.main.runtimeClasspath
//classpath configurations.runtime
}
task fraction2_3(type: JavaExec, dependsOn: classes) {
// To make sure you can always run this task
outputs.upToDateWhen { false }
mainClass.set('infrastructure.ReportFraction2_3')
classpath sourceSets.test.runtimeClasspath
classpath sourceSets.main.runtimeClasspath
//classpath configurations.runtime
}