@@ -19,48 +19,48 @@ version = '0.0.1-SNAPSHOT'
19
19
20
20
task cleanAngular {
21
21
if (project. hasProperty(' withAngular' )) {
22
- logger . info (' Task cleanAngular' )
22
+ println (' Task cleanAngular' )
23
23
delete(' src/angular/node_modules' )
24
24
}
25
25
}
26
26
27
- task buildAngular {
28
- if (project. hasProperty(' withAngular' )) {
29
- providers . exec {
30
- logger . info (' Task buildAngular - npm install' )
31
- workingDir ' src/angular'
27
+ task buildAngular ( type : Exec ) {
28
+ if (project. hasProperty(' withAngular' )) {
29
+ exec{
30
+ println (' Task buildAngular - npm install' )
31
+ workingDir ' src/angular'
32
32
if (System . getProperty(" os.name" ). toUpperCase(). contains(" WINDOWS" )){
33
- commandLine( ' npm.cmd' , ' install' )
33
+ commandLine ' npm.cmd' , ' install'
34
34
} else {
35
- commandLine( ' npm' , ' install' )
35
+ commandLine ' npm' , ' install'
36
36
}
37
37
}
38
- providers . exec {
39
- logger . info (' Task buildAngular - npm run build' )
38
+ exec {
39
+ println (' Task buildAngular - npm run build' )
40
40
workingDir ' src/angular'
41
41
if (System . getProperty(" os.name" ). toUpperCase(). contains(" WINDOWS" )){
42
- commandLine( ' npm.cmd' , ' run' , ' build' )
42
+ commandLine ' npm.cmd' , ' run' , ' build'
43
43
} else {
44
- commandLine( ' npm' , ' run' , ' build' )
44
+ commandLine ' npm' , ' run' , ' build'
45
45
}
46
46
}
47
47
}
48
48
}
49
49
50
- task testAngular {
50
+ task testAngular ( type : Exec ) {
51
51
if (project. hasProperty(' withAngular' )) {
52
- providers . exec {
52
+ exec {
53
53
workingDir ' src/angular'
54
54
if (System . getProperty(" os.name" ). toUpperCase(). contains(" WINDOWS" )){
55
- logger . info (' Task buildAngular - npm run test' )
56
- commandLine( ' npm.cmd' , ' run' , ' test' )
55
+ println (' Task buildAngular - npm run test' )
56
+ commandLine ' npm.cmd' , ' run' , ' test'
57
57
} else {
58
58
if (project. hasProperty(" useChromium" )) {
59
- logger . info (' Task buildAngular - npm run test-chromium' )
60
- commandLine( ' npm' , ' run' , ' test-chromium' )
59
+ println (' Task buildAngular - npm run test-chromium' )
60
+ commandLine ' npm' , ' run' , ' test-chromium'
61
61
} else {
62
- logger . info (' Task buildAngular - npm run test' )
63
- commandLine( ' npm' , ' run' , ' test' )
62
+ println (' Task buildAngular - npm run test' )
63
+ commandLine ' npm' , ' run' , ' test'
64
64
}
65
65
}
66
66
}
0 commit comments