-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.gradle
60 lines (49 loc) · 1.77 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
group 'com.medallia'
version '1.0-SNAPSHOT'
apply plugin: 'java'
repositories {
mavenCentral()
}
configurations {
spoon {
extendsFrom compile
}
}
dependencies {
testCompile group: 'junit', name: 'junit', version: '4.11'
spoon group: 'fr.inria.gforge.spoon', name: 'spoon-core', version: '4.2.0'
spoon 'com.google.code.gson:gson:2.2.4'
spoon 'com.google.guava:guava:18.0'
spoon files('build/classes/main')
compile files('build/classes/main')
compile group: 'fr.inria.gforge.spoon', name: 'spoon-core', version: '4.2.0'
compile 'com.google.code.gson:gson:2.2.4'
compile 'com.google.guava:guava:18.0'
}
task spoonFiles(type:JavaExec, dependsOn: configurations.compile) {
description 'Creates the meta program transforming some instructions.'
classpath configurations.spoon
main = "spoon.Launcher"
args '-v', '--tabs', '--vvv', '--precompile', '--with-imports', '-p', 'com.medallia.codefixer.MetaProgramGenerator', '-o', 'src/test/java', '-i', 'src/samples/prototype'
}
task copyFiles(type:JavaExec, dependsOn: configurations.compile) {
description 'Creates the Meta program without any change (identity transformation). Used to check if the original code pass the tests.'
classpath configurations.spoon
main = "spoon.Launcher"
args '-v', '--tabs', '--vvv', '--precompile', '--with-imports', '-o', 'src/test/java', '-i', 'src/samples/prototype'
}
task fix(type:JavaExec) {
classpath configurations.spoon
classpath configurations.testCompile
classpath "build/classes/main"
classpath "build/classes/test"
main = "com.medallia.codefixer.CodeFixer"
}
task fixDebug(type:JavaExec) {
classpath configurations.spoon
classpath configurations.testCompile
classpath "build/classes/main"
classpath "build/classes/test"
main = "com.medallia.codefixer.CodeFixer"
args 'debug'
}