-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathbuild.gradle
53 lines (45 loc) · 1.49 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
plugins {
id 'java'
id 'application'
}
group 'askov.schoolprojects.compilerconstruction.mjcompiler'
version '1.0'
repositories {
mavenCentral()
flatDir {
dirs 'libs'
}
}
dependencies {
testImplementation group: 'junit', name: 'junit', version: '4.12'
implementation name: 'JFlex'
implementation name: 'cup_v10k'
implementation name: 'log4j-1.2.17'
implementation name: 'mj-runtime-1.1'
implementation name: 'symboltable'
}
test {
testLogging {
outputs.upToDateWhen {false}
showStandardStreams = true
}
}
tasks.register('disassemble', JavaExec) {
mainClass = 'rs.etf.pp1.mj.runtime.disasm'
classpath = sourceSets.main.runtimeClasspath
args "src/test/resources/simple_calculator.obj"
}
tasks.register('genLexer', JavaExec) {
mainClass = 'JFlex.Main'
classpath = sourceSets.main.compileClasspath
args "-d", "src/main/java/askov/schoolprojects/compilerconstruction/mjcompiler", "src/main/spec/mjlexer.flex"
}
tasks.register('genParser', JavaExec) {
mainClass = 'java_cup.Main'
classpath = sourceSets.main.compileClasspath - files("libs/JFlex.jar")
workingDir = 'src/main/java'
args "-destdir", "askov/schoolprojects/compilerconstruction/mjcompiler", "-debug", "-dump_states", "-parser", "MJParser", "-ast", "askov.schoolprojects.compilerconstruction.mjcompiler.ast", "-buildtree", "../spec/mjparser.cup"
}
application {
mainClassName = 'askov.schoolprojects.compilerconstruction.mjcompiler.MJCompiler'
}