1
1
plugins {
2
- id ' org.ajoberstar.grgit' version ' 4.1.0'
3
2
id " com.github.node-gradle.node" version " 3.0.1"
4
3
}
5
4
@@ -9,54 +8,17 @@ dependencies {
9
8
10
9
node {
11
10
// https://github.com/srs/gradle-node-plugin/blob/master/docs/node.md#configuring-the-plugin
12
- version = ' 14.15.4 '
13
- npmVersion = ' 6.14.5 '
11
+ version = ' 17.0.1 '
12
+ npmVersion = ' 8.1.0 '
14
13
download = true
15
14
}
16
15
17
- [' scratch-vm' , ' scratch-gui' ]. collect {
18
- it
19
- }. eachWithIndex { dir, index ->
20
- def dest = file(" $buildDir /$dir " )
21
- task " cloneScratch${ index} " {
22
- if (! dest. exists()) {
23
- def repo = grgit. clone(dir : dest, uri : " https://github.com/edewit/${ dir} .git" )
24
- repo. checkout {
25
- branch = ' storeys'
26
- createBranch = true
27
- startPoint = ' origin/storeys'
28
- }
29
- }
30
- }
31
-
32
- task " npmDoInstall$index " (type : NpmTask , dependsOn : " cloneScratch$index " ) {
33
- workingDir = dest
34
- args = [' install' ]
35
- }
36
-
37
- task " npmBuildProd$index " (type : NpmTask , dependsOn : " npmDoInstall$index " ) {
38
- workingDir = dest
39
- inputs. files(fileTree(" ${ dest} /node_modules" ))
40
- inputs. files(fileTree(" ${ dest} /src" ))
41
- inputs. file(" ${ dest} /package.json" )
42
- inputs. file(" ${ dest} /webpack.config.js" )
43
-
44
- outputs. dir(" ${ dest} /dist" )
45
-
46
- args = [' run' , ' build' ]
47
- }
48
- }
49
-
50
- task npmBuild {
51
- dependsOn npmBuildProd0
52
- dependsOn npmBuildProd1
53
- }
54
16
55
- jar. dependsOn(npmBuild )
17
+ jar. dependsOn(npm_install )
56
18
57
19
jar {
58
20
into ' static' , {
59
- from(" $b uildDir / scratch-gui/build" ) {
21
+ from(" node_modules/minecraft-storeys- scratch-gui/build" ) {
60
22
include ' **/*.*'
61
23
}
62
24
}
0 commit comments