-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
142 lines (123 loc) · 4.82 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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
plugins {
id 'java'
id 'info.solidsoft.pitest' version '1.1.11'
}
group 'PredictorFactory'
version '4.0.7'
sourceCompatibility = 1.8
// Repository
repositories {
mavenCentral()
}
// Dependencies
dependencies {
compile 'org.antlr:antlr4:4.7.1' // Parser
compile 'org.apache.commons:commons-lang3:3.5' // Text processing utility
compile 'com.google.guava:guava:20.0' // Convenience library
compile 'com.zaxxer:HikariCP:2.5.1' // Versions 2.4.2 and 2.4.3 do not release connections -> do not use them
compile 'org.slf4j:slf4j-log4j12:1.7.21' // Logging (required by Hikari)
compile 'log4j:log4j:1.2.17' // Logging (why not JUL? Because of the superior PatternLayout)
// compile 'org.sql2o:sql2o:1.5.4' // Experimental, could work
// compile 'org.codejargon:fluentjdbc:1.3.5' // Experimental
compile 'com.github.rjeschke:txtmark:0.13' // Markdown for GUI
compile 'com.intellij:annotations:12.0' // Not null annotation
compile 'org.hibernate:hibernate-core:5.2.5.Final' // Experimental for SQL formatting (but exports only into plaintext, does not play well with postgre's "mode")
compile 'com.atlassian.commonmark:commonmark:0.8.0' // Experimental Markdown
compile "org.controlsfx:controlsfx:8.40.13" // For CheckComboBox in GUI
// compileOnly 'org.projectlombok:lombok:1.16.18' // Necessary only during the compilation phase -> do not deploy it
runtime fileTree(dir: 'lib/jdbc-driver/mssql', include: '*.jar') // The search is not recursive -> list all directories
runtime fileTree(dir: 'lib/jdbc-driver/mysql', include: '*.jar')
runtime fileTree(dir: 'lib/jdbc-driver/oracle', include: '*.jar')
runtime fileTree(dir: 'lib/jdbc-driver/postgresql', include: '*.jar')
runtime fileTree(dir: 'lib/jdbc-driver/sas', include: '*.jar')
compile fileTree(dir: 'lib/sqlformatter', include: '*.jar') // But fails on "mode" in postgre sql...
compile fileTree(dir: 'lib/SQLinForm', include: '*.jar') // Ok
compile fileTree(dir: 'lib', include: '*.jar')
testCompile fileTree(dir: 'lib/rapidminer', include: '*.jar') // For classification and regression
testCompile 'junit:junit:4.12'
testCompile 'org.spockframework:spock-core:1.1-groovy-2.4' // Spock testing framework
testCompile "org.codehaus.groovy:groovy-all:2.4.10" // Required by Spock
testCompile 'info.solidsoft.spock:spock-global-unroll:0.5.0' // Automatic unrolling of Spock tests: https://solidsoft.wordpress.com/tag/mutation-testing/
testCompile 'org.evosuite:evosuite-standalone-runtime:1.0.5' // Evolutionary creation of unit tests
}
// Directory structure
sourceSets {
main {
java {
srcDirs = ['src', 'antlr', 'gui']
}
resources {
srcDirs = ['src/resources', 'gui/resources']
}
}
test {
java {
srcDirs = ['test', 'testBenchmark']
}
}
}
// How to build the jar file
jar {
manifest {
attributes(
'Class-Path': configurations.runtime.collect { "lib/$it.name" }.join(' '), // Where to look for .jars
'Main-Class': 'controller.MainApp', // What to execute. For CLI: run.Launcher
'Implementation-Version': version // To be able to read it during the runtime
)
}
}
// Deployment task
task deploy(dependsOn: 'jar') {
doFirst {
copy {
from "$buildDir/$libsDirName"
into "$buildDir/output"
}
copy {
from configurations.runtime + configurations.compile
into "$buildDir/output/lib"
}
copy {
from 'pattern'
into "$buildDir/output/pattern"
}
copy {
from 'pattern_bkp'
into "$buildDir/output/pattern"
}
copy {
from 'config'
into "$buildDir/output/config"
exclude 'journal.xml'
}
copy {
from 'config/log4j.properties'
into "$buildDir/output/config"
filter { String line -> line.replaceAll('log4j.rootLogger=DEBUG, CA, FA, XML, CNT', 'log4j.rootLogger=DEBUG, CA, FA, XML, CNT, GUI') }
}
copy {
from 'LICENSE.txt'
into "$buildDir/output"
}
}
}
// Make a zip file
task zip(type: Zip, dependsOn: 'deploy') {
from "$buildDir/output"
version = null
}
// Display more details when unit tests fail (equivalent to "gradle test --info" without the irrelevant noise)
test {
testLogging {
exceptionFormat = 'full'
}
}
// Mutation testing
pitest {
targetClasses = ['propagation.Propagation']
targetTests = ['propagation.PropagationTest']
threads = 4
excludedMethods = ['toString']
timestampedReports = false
verbose = true
}