-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
85 lines (72 loc) · 2.18 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
plugins {
id 'application'
id 'scala'
}
application {
mainClassName = 'ca.uwaterloo.flix.Main'
}
repositories {
mavenCentral()
}
dependencies {
implementation 'org.scala-lang:scala-library:2.13.5'
implementation 'org.scala-lang:scala-reflect:2.13.5'
implementation files('lib/com.github.scopt-3.7.1.jar')
implementation files('lib/flix-runtime.jar')
implementation files('lib/org.java_websocket-1.3.9.jar')
implementation files('lib/org.jline-3.5.1.jar')
implementation files('lib/org.json4s-ast-3.5.5.jar')
implementation files('lib/org.json4s-core-3.5.5.jar')
implementation files('lib/org.json4s-native-3.5.5.jar')
implementation files('lib/org.objectweb.asm-all-5.2.jar')
implementation files('lib/org.parboiled-2.2.1.jar')
implementation files('lib/org.scalactic-3.0.8.jar')
implementation files('lib/org.scalatest-3.0.8.jar')
implementation files('lib/scala.collection.parallel-0.2.0.jar')
implementation files('lib/scala.xml-1.2.0.jar')
implementation files('lib/shapeless-2.3.3.jar')
}
tasks.withType(ScalaCompile) {
scalaCompileOptions.additionalParameters = [
"-language:postfixOps",
"-Xfatal-warnings",
"-Ypatmat-exhaust-depth", "200"
]
compileScala.sourceCompatibility = 11
compileScala.targetCompatibility = 11
}
sourceSets {
main {
scala {
srcDirs = ['main/src']
}
}
test {
scala {
srcDirs = ['main/test']
}
}
}
jar {
manifest {
attributes 'Main-Class': 'ca.uwaterloo.flix.Main'
}
from {
// This line has to come before the next
configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
configurations.compileClasspath.collect { it.isDirectory() ? it : zipTree(it) }
}
from('main') {
include '**/*.flix'
}
from('main') {
include '**/*.jar'
}
}
task testAll(dependsOn: ['testClasses'], type: JavaExec) {
main = 'org.scalatest.tools.Runner'
args = ['-s', 'ca.uwaterloo.flix.TestAll', '-o']
classpath = sourceSets.test.runtimeClasspath
standardInput = System.in
}
test.dependsOn testAll