-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.gradle
92 lines (74 loc) · 1.96 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
plugins {
id 'application'
//Plugin to create fat jars, this will bundle all libraries into the jar file, and avoid having to distribute library files.
id 'com.github.johnrengelman.shadow' version '2.0.4'
}
boolean isWindows = System.properties.'os.name'.toLowerCase().contains('windows');
//Change to test better Java versions
sourceCompatibility = 8
targetCompatibility = 8
repositories {
mavenCentral()
}
mainClassName = 'se306group8.scheduleoptimizer.Main'
sourceSets {
main {
java.srcDirs = ['src/main']
resources.srcDirs = ['res/main']
}
test {
java.srcDirs = ['src/test']
resources.srcDirs = ['res/test']
}
}
dependencies {
compile group: 'commons-cli', name: 'commons-cli', version:'1.4'
compile 'com.jfoenix:jfoenix:8.0.7' // For Java 8
//compile 'com.jfoenix:jfoenix:9.0.6' // For Java 9
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-api', version: '5.2.0'
testRuntimeOnly group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: '5.2.0'
}
test {
useJUnitPlatform {
includeEngines 'junit-jupiter'
}
}
jar {
from('.'){
include('NOTICE.txt')
include('licenses/')
into('.')
}
manifest {
attributes('Main-Class': mainClassName)
}
}
task generateDotFiles(type: Exec) {
//standardOutput = new ByteArrayOutputStream()
//errorOutput = new ByteArrayOutputStream()
def script = 'gxl2dot_dataset.sh'
def input = 'gxl_dataset'
def output = 'dataset'
workingDir 'conversion_script'
inputs.dir "conversion_script/$input"
inputs.file "conversion_script/$script"
outputs.dir output
doFirst {
mkdir "$output"
mkdir "$output/input"
mkdir "$output/output"
}
commandLine 'bash', '-c', "bash $script ../$output $input/*"
}
task cleanDotFiles(type: Delete) {
delete 'dataset/output'
delete 'dataset/input'
}
task rebuildDotFiles {
dependsOn 'cleanDotFiles'
dependsOn 'generateDotFiles'
generateDotFiles.mustRunAfter 'cleanDotFiles'
}
tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
}