diff options
Diffstat (limited to 'language-web/build.gradle')
-rw-r--r-- | language-web/build.gradle | 28 |
1 files changed, 2 insertions, 26 deletions
diff --git a/language-web/build.gradle b/language-web/build.gradle index b1ad86a7..a549288a 100644 --- a/language-web/build.gradle +++ b/language-web/build.gradle | |||
@@ -1,5 +1,5 @@ | |||
1 | plugins { | 1 | plugins { |
2 | alias libs.plugins.frontend | 2 | id 'refinery-frontend-workspace' |
3 | id 'refinery-java-application' | 3 | id 'refinery-java-application' |
4 | id 'refinery-xtext-conventions' | 4 | id 'refinery-xtext-conventions' |
5 | } | 5 | } |
@@ -31,36 +31,12 @@ for (taskName in ['compileJava', 'processResources']) { | |||
31 | def webpackOutputDir = "${buildDir}/webpack" | 31 | def webpackOutputDir = "${buildDir}/webpack" |
32 | def productionResources = "${webpackOutputDir}/production" | 32 | def productionResources = "${webpackOutputDir}/production" |
33 | def serverMainClass = 'tools.refinery.language.web.ServerLauncher' | 33 | def serverMainClass = 'tools.refinery.language.web.ServerLauncher' |
34 | def nodeDirectory = "${rootDir}/.gradle/node" | ||
35 | 34 | ||
36 | frontend { | 35 | frontend { |
37 | nodeVersion = project.ext['frontend.nodeVersion'] | 36 | assembleScript = 'assemble:webpack' |
38 | nodeInstallDirectory = file('.node') | ||
39 | yarnEnabled = true | ||
40 | yarnVersion = project.ext['frontend.yarnVersion'] | ||
41 | assembleScript = 'run assemble:webpack' | ||
42 | } | ||
43 | |||
44 | tasks.named('installYarnGlobally') { | ||
45 | // Do not check for updates all the time, since we only use yarn 1 for calling yarn berry. | ||
46 | outputs.dir "${frontend.nodeInstallDirectory.get()}/lib/node_modules/yarn" | ||
47 | } | ||
48 | |||
49 | tasks.named('enableYarnBerry') { | ||
50 | // Yarn berry is checked into the repository, so there's no need to install it. | ||
51 | enabled = false | ||
52 | } | ||
53 | |||
54 | tasks.named('installYarn') { | ||
55 | // Yarn berry is checked into the repository, so there's no need to install it. | ||
56 | enabled = false | ||
57 | } | 37 | } |
58 | 38 | ||
59 | def installFrontend = tasks.named('installFrontend') | 39 | def installFrontend = tasks.named('installFrontend') |
60 | installFrontend.configure { | ||
61 | inputs.files('package.json', 'yarn.lock') | ||
62 | outputs.file '.pnp.cjs' | ||
63 | } | ||
64 | 40 | ||
65 | def generateLezerGrammar = tasks.register('generateLezerGrammar', RunYarn) { | 41 | def generateLezerGrammar = tasks.register('generateLezerGrammar', RunYarn) { |
66 | dependsOn installFrontend | 42 | dependsOn installFrontend |