-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuild.gradle
106 lines (89 loc) · 2.73 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
import org.apache.tools.ant.taskdefs.condition.Os
def checkWin() {
return Os.isFamily(Os.FAMILY_WINDOWS)
}
def getMvn() {
def ending = ""
if (checkWin()) {
ending = ".cmd"
}
return "mvn${ending}"
}
task wrapper(type: Wrapper) {
gradleVersion = '4.6'
}
task installReflectionCommon(type: Exec) {
def mavenExecutable = getMvn()
workingDir "kotlin2js-reflection-core"
executable mavenExecutable
args "install"
}
task cleanReflectionCommon(type: Exec) {
def mavenExecutable = getMvn()
workingDir "kotlin2js-reflection-core"
executable mavenExecutable
args "clean"
}
task testReflectionCommon(type: Exec) {
def mavenExecutable = getMvn()
workingDir "kotlin2js-reflection-core-test"
executable mavenExecutable
args "test"
}
task cleanReflectionCommonTest(type: Exec) {
def mavenExecutable = getMvn()
workingDir "kotlin2js-reflection-core-test"
executable mavenExecutable
args "clean"
}
task installReflectionMavenPlugin(type: Exec) {
def mavenExecutable = getMvn()
workingDir "kotlin2js-reflection-mplugin"
executable mavenExecutable
args "install"
}
task cleanReflectionMavenPlugin(type: Exec) {
def mavenExecutable = getMvn()
workingDir "kotlin2js-reflection-mplugin"
executable mavenExecutable
args "clean"
}
task installReflectionApi(type: Exec) {
def mavenExecutable = getMvn()
workingDir "kotlin2js-reflection-api"
executable mavenExecutable
args "install"
}
task cleanReflectionApi(type: Exec) {
def mavenExecutable = getMvn()
workingDir "kotlin2js-reflection-api"
executable mavenExecutable
args "clean"
}
task installReflectionPluginApiTest(type: Exec) {
def mavenExecutable = getMvn()
workingDir "kotlin2js-reflection-plugin-test"
executable mavenExecutable
args "test"
}
task cleanReflectionPluginApiTest(type: Exec) {
def mavenExecutable = getMvn()
workingDir "kotlin2js-reflection-plugin-test"
executable mavenExecutable
args "clean"
}
task runAllTest {}
project(':kotlin2js-reflection-gplugin').afterEvaluate {
project(':kotlin2js-reflection-gplugin').tasks.getByName('assemble').dependsOn(installReflectionCommon)
}
def cleanTask = getTasksByName("clean", true)[0]
cleanTask.dependsOn(cleanReflectionCommon)
cleanTask.dependsOn(cleanReflectionCommonTest)
cleanTask.dependsOn(cleanReflectionMavenPlugin)
cleanTask.dependsOn(cleanReflectionApi)
cleanTask.dependsOn(cleanReflectionPluginApiTest)
runAllTest.finalizedBy(installReflectionMavenPlugin)
runAllTest.dependsOn ':kotlin2js-reflection-gplugin:build'
runAllTest.dependsOn ':kotlin2js-reflection-gplugin:publishToMavenLocal'
runAllTest.finalizedBy(installReflectionApi)
runAllTest.finalizedBy(installReflectionPluginApiTest)