1
+ buildscript {
2
+ repositories {
3
+ mavenLocal()
4
+ maven {
5
+ url " https://m2.convertigo.com"
6
+ }
7
+ mavenCentral()
8
+ }
9
+ dependencies {
10
+ classpath ' org.eclipse.jgit:org.eclipse.jgit.ssh.jsch:[5.4,)'
11
+ classpath ' com.convertigo:gradle-plugin:8.4.0-SNAPSHOT'
12
+ }
13
+ }
14
+
15
+ apply plugin : ' convertigo'
16
+
17
+ /* * Convertigo Gradle Plugin DSL **/
18
+
19
+ // // determines if the project needs to perform a mobile build before 'deploy' or 'car' tasks
20
+ // // can also be configured with a -Pconvertigo.performsMobileBuild as Gradle parameter
21
+ def performsMobileBuild = file(' _c8oProject/mobilePages' ). exists() && ! ' false' . equals(project. properties[' convertigo.performsMobileBuild' ])
22
+
23
+ // // the 'load' task loads and migrates the project to the current plugin version
24
+ load {
25
+ // // change the 'version' property of the project at loading
26
+ // // can also be configured with a -Pconvertigo.load.projectVersion as Gradle parameter
27
+ // projectVersion '1.0.0-release'
28
+
29
+ // // change the 'Convertigo server endpoint' property of the project's mobile application at loading
30
+ // // can also be configured with a -Pconvertigo.load.mobileApplicationEndpoint as Gradle parameter
31
+ // mobileApplicationEndpoint 'https://myserver.com/convertigo'
32
+
33
+ // // specify a folder where to auto-import git references
34
+ // // can also be configured with a -Pconvertigo.load.gitContainer as Gradle parameter
35
+ // gitContainer '..'
36
+
37
+ doLast {
38
+ // // any property of the project can be changed here
39
+ // convertigoProject.comment += ' edited by gradle'
40
+ }
41
+ }
42
+
43
+ // // the 'export' task depends on 'load' and saves the project at the current plugin version
44
+ export {
45
+ // // mobile application can be built before the 'export', then 'car' and 'deploy' can use build result
46
+ if (performsMobileBuild) {
47
+ dependsOn compileMobileBuilder
48
+ }
49
+ }
50
+
51
+ // // the 'generateMobileBuilder' task depends on 'load' and generates sources of the Ionic application into _private/ionic
52
+ generateMobileBuilder {
53
+ // // configure the generation mode, can be can be production (default) or debugplus, debug, fast
54
+ // // if omitted, compileMobileBuilder.mode is used
55
+ // // can also be configured with a -Pconvertigo.generateMobileBuilder.mode as Gradle parameter
56
+ // mode 'production'
57
+ }
58
+
59
+ // // the 'compileMobileBuilder' task depends on 'generateMobileBuilder' and compiles the Ionic application with NPM into DisplayObject/mobile
60
+ compileMobileBuilder {
61
+ // // configure the generation mode, can be can be production (default) or debug
62
+ // // if omitted, generateMobileBuilder.mode is used
63
+ // // can also be configured with a -Pconvertigo.compileMobileBuilder.mode as Gradle parameter
64
+ // mode 'production'
65
+ }
66
+
67
+ // // the 'car' task allows to build a <projectName>.car inside the <projectdir>/build folder
68
+ car {
69
+ // // configure the destination of the <projectName>.car file (default 'build' folder)
70
+ // // can also be configured with a -Pconvertigo.car.destinationDir as Gradle parameter
71
+ // destinationDir 'build'
72
+
73
+ // // include TestCases (default true)
74
+ // // can also be configured with a -Pconvertigo.car.includeTestCases as Gradle parameter
75
+ // includeTestCases true
76
+
77
+ // // include Stubs (default true)
78
+ // // can also be configured with a -Pconvertigo.car.includeStubs as Gradle parameter
79
+ // includeStubs true
80
+
81
+ // // include built MobileApp (default true)
82
+ // // can also be configured with a -Pconvertigo.car.includeMobileApp as Gradle parameter
83
+ // includeMobileApp true
84
+
85
+ // // include built MobileApp assets (default true)
86
+ // // can also be configured with a -Pconvertigo.car.includeMobileAppAssets as Gradle parameter
87
+ // includeMobileAppAssets true
88
+
89
+ // // include mobile dataset (default true)
90
+ // // can also be configured with a -Pconvertigo.car.includeMobileDataset as Gradle parameter
91
+ // includeMobileDataset true
92
+
93
+ // // include mobile platform assets (default true)
94
+ // // can also be configured with a -Pconvertigo.car.includeMobilePlatformsAssets as Gradle parameter
95
+ // includeMobilePlatformsAssets true
96
+
97
+ doLast {
98
+ println " Saved Convertigo archive: $destinationFile "
99
+ }
100
+ }
101
+
102
+ // // the 'deploy' task depends on 'car' and allows to push the project to a Convertigo server
103
+ // // the task is auto skipped if properties are empties, following tasks can check deploy.state.didWork
104
+ deploy {
105
+ // // deploy the current project to <server> using user/password credentials
106
+ // // can also be configured with a -Pconvertigo.deploy.server as Gradle parameter
107
+ // // Note: the task is skipped if the property doesn't start with http
108
+ // server 'https://myserver.com/convertigo'
109
+
110
+ // // user used by the deploy action, default is 'admin'
111
+ // // can also be configured with a -Pconvertigo.deploy.user as Gradle parameter
112
+ // // Note: the task is skipped if the property is empty
113
+ // user 'admin'
114
+
115
+ // // password used by the deploy action, default is 'admin'
116
+ // // can also be configured with a -Pconvertigo.deploy.password as Gradle parameter
117
+ // // Note: the task is skipped if the property is empty
118
+ // user 'password'
119
+
120
+ // // deploy over an https <server> without checking certificates, default is false
121
+ // // can also be configured with a -Pconvertigo.deploy.trustAllCertificates as Gradle parameter
122
+ // trustAllCertificates false
123
+
124
+ // // assemble XSL files on deploy, default is false
125
+ // // can also be configured with a -Pconvertigo.deploy.assembleXsl as Gradle parameter
126
+ // assembleXsl false
127
+
128
+ // // retry <retry> times in case of deploy failure, default is 5
129
+ // // can also be configured with a -Pconvertigo.deploy.retry as Gradle parameter
130
+ // retry 5
131
+ }
132
+
133
+ // // the 'remoteBuild' task depends on 'load' and it's just a configurator for 'launchRemoteBuild' and 'downloadRemoteBuild'
134
+ remoteBuild {
135
+ if (performsMobileBuild) {
136
+ dependsOn compileMobileBuilder
137
+ }
138
+
139
+ // // set an array of platforms (Convertigo Platforms object) names to build, empty means all declared platforms
140
+ // // can also be configured with a -Pconvertigo.remoteBuild.platforms as Gradle parameter (names separated by comma)
141
+ // platforms = []
142
+
143
+ // // set authenticationToken from your phonegapbuild account, default use Convertigo one
144
+ // // can also be configured with a -Pconvertigo.remoteBuild.authenticationToken
145
+ // authenticationToken ''
146
+
147
+ // // set the platform used to build application, default is https://build.convertigo.net
148
+ // // can also be configured with a -Pconvertigo.remoteBuild.mobileBuilderPlatformURL
149
+ // mobileBuilderPlatformURL ''
150
+
151
+ // // set the iOS certificate title declared on your phonegapbuild account, default use Convertigo one
152
+ // // can also be configured with a -Pconvertigo.remoteBuild.iosCertificateTitle
153
+ // iosCertificateTitle ''
154
+
155
+ // // set the iOS certificate password declared on your phonegapbuild account, default use Convertigo one
156
+ // // can also be configured with a -Pconvertigo.remoteBuild.iosCertificatePassword
157
+ // iosCertificatePassword ''
158
+
159
+ // // set the Android certificate title declared on your phonegapbuild account, default use Convertigo one
160
+ // // can also be configured with a -Pconvertigo.remoteBuild.androidCertificateTitle
161
+ // androidCertificateTitle ''
162
+
163
+ // // set the Android certificate password declared on your phonegapbuild account, default use Convertigo one
164
+ // // can also be configured with a -Pconvertigo.remoteBuild.androidCertificatePassword
165
+ // androidCertificatePassword ''
166
+
167
+ // // set the Android certificate keystore password declared on your phonegapbuild account, default use Convertigo one
168
+ // // can also be configured with a -Pconvertigo.remoteBuild.androidCertificateKeystorePassword
169
+ // androidCertificateKeystorePassword ''
170
+ }
171
+
172
+ // // the 'localBuild' task depends on 'load' and allows to build mobile native package locally
173
+ localBuild {
174
+ if (performsMobileBuild) {
175
+ dependsOn compileMobileBuilder
176
+ }
177
+
178
+ // // set an array of platforms (Convertigo Platforms object) names to build, empty means all declared platforms
179
+ // // can also be configured with a -Pconvertigo.localBuild.platforms as Gradle parameter (names separated by comma)
180
+ // platforms = []
181
+
182
+ // // build mode of the native package, can be 'release' or 'debug' (default)
183
+ // // can also be configured with a -Pconvertigo.localBuild.mode as Gradle parameter
184
+ // // the Android 'debug' mode doesn't need signing configuration
185
+ // mode = 'debug'
186
+
187
+ // // define where are moved mobile package when the build success
188
+ // // can also be configured with a -Pconvertigo.localBuild.packageDestinationDir as Gradle parameter
189
+ // packageDestinationDir = file('build/localDir')
190
+
191
+ // // define the IOS Provisioning Profile file used to sign the IPA package
192
+ // // can also be configured with a -Pconvertigo.localBuild.iosProvisioningProfile as Gradle parameter
193
+ // iosProvisioningProfile = file('ios.mobileprovision')
194
+
195
+ // // define the IOS Sign Identity used to sign the IPA package
196
+ // // can also be configured with a -Pconvertigo.localBuild.iosSignIdentity as Gradle parameter
197
+ // iosSignIdentity = (mode == 'release' ? 'iPhone Distribution' : 'iPhone Developer')
198
+
199
+ // // define the Android Keystore file used to sign the release APK package
200
+ // // can also be configured with a -Pconvertigo.localBuild.androidKeystore as Gradle parameter
201
+ // androidKeystore = file('android.keystore')
202
+
203
+ // // define the Android Keystore password
204
+ // // can also be configured with a -Pconvertigo.localBuild.androidKeystorePassword as Gradle parameter
205
+ // androidKeystorePassword = ''
206
+
207
+ // // define the certificate alias, inside the Android Keystore, that sign the release APK package
208
+ // // can also be configured with a -Pconvertigo.localBuild.androidAlias as Gradle parameter
209
+ // androidAlias = ''
210
+
211
+ // // define the certificate password, inside the Android Keystore, that sign the release APK package
212
+ // // can also be configured with a -Pconvertigo.localBuild.androidPassword as Gradle parameter
213
+ // androidPassword = ''
214
+ }
215
+
216
+ // // the 'launchRemoteBuild' task depends on 'remoteBuild' and uploads the mobile source package to the Convertigo Build Gateway
217
+ launchRemoteBuild {
218
+
219
+ }
220
+
221
+ // // the 'downloadRemoteBuild' task depends on 'launchRemoteBuild' and waits the remote build to finish, then download the native packages (iOS ipa or Android apk)
222
+ downloadRemoteBuild {
223
+ // // configure the destination of built mobile application packages (default 'build' folder)
224
+ // // can also be configured with a -Pconvertigo.downloadRemoteBuild.destinationDir as Gradle parameter
225
+ // destinationDir 'build'
226
+
227
+ doLast {
228
+ destinationFiles. each {
229
+ println " Downloaded mobile application package: $it "
230
+ }
231
+ }
232
+ }
233
+
234
+ // // the 'wrapper' task is used to upgrade the Gradle wrapper of the projet
235
+ if (! tasks. findByName(' wrapper' )) {
236
+ task wrapper(type : Wrapper ) {
237
+ group ' build setup'
238
+ description ' Generates Gradle wrapper files.'
239
+ }
240
+ }
241
+ wrapper. gradleVersion = ' 8.5'
0 commit comments