-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbuild.gradle
169 lines (165 loc) · 5.7 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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
buildscript {
apply from: "common-buildscript.gradle", to: buildscript
}
ext {
topDir = projectDir
}
apply from: "common.gradle"
/**
* Sdk
*/
task cleanSdk(type: GradleBuild) {
group = "halo"
description = "Cleans the sdk"
buildFile = file('sdk/build.gradle')
tasks = ["clean"]
startParameter.projectProperties = gradle.startParameter.projectProperties
}
task installGradlePlugin(type: GradleBuild) {
group = "halo"
description = "Installs the Halo gradle plugin into the local repo"
buildFile = file('sdk/halo-plugin/build.gradle')
tasks = ['install']
startParameter.projectProperties = gradle.startParameter.projectProperties
}
task installSdk(type: GradleBuild) {
dependsOn cleanSdk
group = "halo"
description = "Installs the Halo sdk dependencies into the local repository"
buildFile = file('sdk/build.gradle')
tasks = ['install']
startParameter.projectProperties = gradle.startParameter.projectProperties
}
task distributeSdk(type: GradleBuild) {
dependsOn installGradlePlugin
group = "halo"
description = "Distributes the halo gradle plugin"
buildFile = file('sdk/build.gradle')
tasks = ["distribute"]
startParameter.projectProperties = gradle.startParameter.projectProperties
}
task testSdk(type: GradleBuild){
group = "halo"
description = "Passes all the tests available in the sdk projects"
buildFile = file('sdk/build.gradle')
tasks = ["createReleaseUnitTestCoverageReport"]
startParameter.projectProperties = gradle.startParameter.projectProperties
}
task documentSdk(type: GradleBuild){
group = "halo"
description = "Documents the sdk."
buildFile = file('sdk/build.gradle')
tasks = ["documentationRelease"]
startParameter.projectProperties = gradle.startParameter.projectProperties
}
task codeQualitySdk(type: GradleBuild) {
group = "halo"
description = "Evaluates the code quality of the sdk"
buildFile = file('sdk/build.gradle')
tasks = ["codeQualityRelease"]
startParameter.projectProperties = gradle.startParameter.projectProperties
}
task lintSdk(type: GradleBuild) {
group = "halo"
description = "Passes lint checks to the sdk"
buildFile = file('sdk/build.gradle')
tasks = ["lintRelease"]
startParameter.projectProperties = gradle.startParameter.projectProperties
}
task dexCountSdk(type: GradleBuild) {
group = "halo"
description = "Counts the number of methods in the sdk"
buildFile = file('sdk/build.gradle')
tasks = ["countReleaseDexMethods"]
startParameter.projectProperties = gradle.startParameter.projectProperties
}
/**
* SDK Libraries
*/
task cleanLibraries(type: GradleBuild) {
group = "halo"
description = "Cleans the sdk libraries"
buildFile = file('sdk-libs/build.gradle')
tasks = ["clean"]
startParameter.projectProperties = gradle.startParameter.projectProperties
}
task installLibraries(type: GradleBuild) {
dependsOn cleanLibraries
group = "halo"
description = "Installs all the sdk libraries"
buildFile = file('sdk-libs/build.gradle')
tasks = ['install']
startParameter.projectProperties = gradle.startParameter.projectProperties
}
task distributeLibraries(type: GradleBuild) {
dependsOn distributeSdk
group = "halo"
description = "Installs all the sdk libraries"
buildFile = file('sdk-libs/build.gradle')
tasks = ['distribute']
startParameter.projectProperties = gradle.startParameter.projectProperties
}
task testLibraries(type: GradleBuild){
group = "halo"
description = "Passes all the tests available in the sdk projects"
buildFile = file('sdk-libs/build.gradle')
tasks = ["createReleaseUnitTestCoverageReport"]
startParameter.projectProperties = gradle.startParameter.projectProperties
}
task documentLibraries(type: GradleBuild){
group = "halo"
description = "Documents the sdk libraries"
buildFile = file('sdk-libs/build.gradle')
tasks = ["documentationRelease"]
startParameter.projectProperties = gradle.startParameter.projectProperties
}
task codeQualityLibraries(type: GradleBuild) {
group = "halo"
description = "Evaluates the code quality of the sdk libraries"
buildFile = file('sdk-libs/build.gradle')
tasks = ["codeQualityRelease"]
startParameter.projectProperties = gradle.startParameter.projectProperties
}
task lintLibraries(type: GradleBuild) {
group = "halo"
description = "Passes lint checks to the libraries"
buildFile = file('sdk-libs/build.gradle')
tasks = ["lintRelease"]
startParameter.projectProperties = gradle.startParameter.projectProperties
}
task dexCountLibraries(type: GradleBuild) {
group = "halo"
description = "Counts the number of methods in the sdk libraries"
buildFile = file('sdk-libs/build.gradle')
tasks = ["countReleaseDexMethods"]
startParameter.projectProperties = gradle.startParameter.projectProperties
}
/**
* Build Demo
*/
task buildDebugDemo(type: GradleBuild){
group = "halo"
description = "Builds the debug demo apk"
buildFile = file('sdk-samples/halo-demo/build.gradle')
tasks = ["assembleDebug"]
startParameter.projectProperties = gradle.startParameter.projectProperties
}
task buildReleaseDemo(type: GradleBuild){
group = "halo"
description = "Builds the release demo apk"
buildFile = file('sdk-samples/halo-demo/build.gradle')
tasks = ["assembleRelease"]
startParameter.projectProperties = gradle.startParameter.projectProperties
}
//Release script to create new releases of the sdk
apply plugin: 'ch.netzwerg.release'
task build(type: GradleBuild) {
dependsOn installGradlePlugin
dependsOn distributeSdk
dependsOn distributeLibraries
}
release {
push = false
versionSuffix = '-SNAPSHOT'
tagPrefix = ''
}