-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathbuild.gradle
More file actions
68 lines (49 loc) · 1.53 KB
/
build.gradle
File metadata and controls
68 lines (49 loc) · 1.53 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
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
import org.gradle.api.tasks.testing.logging.TestLogEvent
plugins {
id 'scala'
}
ext {
scalaMajorVersion = '2.13'
scalaVersion = "${scalaMajorVersion}.16"
}
repositories {
flatDir {
dirs 'lib'
}
mavenCentral()
}
sourceSets.main.scala.srcDirs = ['src']
sourceSets.test.scala.srcDirs = ['test']
dependencies {
implementation "org.scala-lang:scala-library:${scalaVersion}"
testImplementation 'junit:junit:4.13.2'
testImplementation("org.scala-lang:scala-reflect") {
version {
strictly '2.13.16'
}
}
testImplementation('org.junit.vintage:junit-vintage-engine:5.9.0')
testImplementation("org.scalatest:scalatest_${scalaMajorVersion}:3.0.9")
}
task zip(type: Zip) {
group = "prepareZipForSubmit"
description = "Zip your code for submission to Canvas"
// To make sure you can always run this task
outputs.upToDateWhen { false }
dependsOn assemble
from fileTree(dir: '.')
include 'src/warmup/**.scala'
archiveFileName = 'warmup.zip'
destinationDirectory = layout.buildDirectory.dir("$projectDir")
}
/* this prints a number between 0.0 and 1.0 to stderr
for use in codegrade
*/
task fraction(type: JavaExec, dependsOn: classes) {
// To make sure you can always run this task
outputs.upToDateWhen { false }
mainClass = 'warmup.infrastructure.ReportFraction'
classpath sourceSets.test.runtimeClasspath
classpath sourceSets.main.runtimeClasspath
}