@@ -232,22 +232,21 @@ node {
232
232
*/
233
233
// Version of node to use.
234
234
version = ' 10.14.1'
235
- // Version of npm to use.
235
+ // Version of yarn to use.
236
236
yarnVersion = ' 1.15.2'
237
237
// If true, it will download node using above parameters.
238
238
// If false, it will try to use globally installed node.
239
239
download = true
240
240
}
241
241
242
242
String testsExecutedMarkerName = " ${ projectDir} /.tests.executed"
243
- task testYarn (type : YarnTask ) {
243
+ task testYarn (type : YarnTask , dependsOn : ' yarn ' ) {
244
244
dependsOn assemble
245
245
// force Jest test runner to execute tests once and finish the process instead of starting watch mode
246
246
environment CI : ' true'
247
247
args = [' run' , ' test' ]
248
248
inputs. files fileTree(' src/js' )
249
- inputs. file ' package.json'
250
- inputs. file ' package-lock.json'
249
+ inputs. file ' yarn.lock'
251
250
// allows easy triggering re-tests
252
251
doLast {
253
252
new File (testsExecutedMarkerName). text = ' delete this file to force re-execution JavaScript tests'
@@ -256,14 +255,13 @@ task testYarn(type: YarnTask) {
256
255
}
257
256
check. dependsOn testYarn
258
257
259
- task buildYarn (type : YarnTask ) {
258
+ task buildYarn (type : YarnTask , dependsOn : ' yarn ' ) {
260
259
dependsOn assemble
261
260
// force Jest test runner to execute tests once and finish the process instead of starting watch mode
262
261
environment CI : ' true'
263
262
args = [' run' , ' build' ]
264
263
inputs. files fileTree(' src/js' )
265
- inputs. file ' package.json'
266
- inputs. file ' package-lock.json'
264
+ inputs. file ' yarn.lock'
267
265
}
268
266
build. dependsOn buildYarn
269
267
0 commit comments