Skip to content

Commit b5135b0

Browse files
edewitvorburger
authored andcommitted
no longer build the forks but uses npm to download
1 parent ffc2b86 commit b5135b0

File tree

3 files changed

+17338
-43
lines changed

3 files changed

+17338
-43
lines changed

scratch3/build.gradle

Lines changed: 4 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
plugins {
2-
id 'org.ajoberstar.grgit' version '4.1.0'
32
id "com.github.node-gradle.node" version "3.0.1"
43
}
54

@@ -9,54 +8,17 @@ dependencies {
98

109
node {
1110
// 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'
1413
download = true
1514
}
1615

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-
}
5416

55-
jar.dependsOn(npmBuild)
17+
jar.dependsOn(npm_install)
5618

5719
jar {
5820
into 'static', {
59-
from("$buildDir/scratch-gui/build") {
21+
from("node_modules/minecraft-storeys-scratch-gui/build") {
6022
include '**/*.*'
6123
}
6224
}

0 commit comments

Comments
 (0)