aboutsummaryrefslogtreecommitdiffstats
path: root/language-web
diff options
context:
space:
mode:
authorLibravatar Kristóf Marussy <kristof@marussy.com>2021-11-17 03:06:39 +0100
committerLibravatar Kristóf Marussy <kristof@marussy.com>2021-11-17 03:06:39 +0100
commit720b9e2fb0968905e5a80f6099eab37554a6af58 (patch)
treeb471f4da129efbfa730830a70e0107de852833d7 /language-web
parentbuild: use version catalogs (diff)
downloadrefinery-720b9e2fb0968905e5a80f6099eab37554a6af58.tar.gz
refinery-720b9e2fb0968905e5a80f6099eab37554a6af58.tar.zst
refinery-720b9e2fb0968905e5a80f6099eab37554a6af58.zip
build: move scripts into script plugins
Script plugins allow applying other plugins from plugins { } blocks, which simplifies the build script.
Diffstat (limited to 'language-web')
-rw-r--r--language-web/build.gradle19
1 files changed, 10 insertions, 9 deletions
diff --git a/language-web/build.gradle b/language-web/build.gradle
index 12f2f3a0..1bacd35c 100644
--- a/language-web/build.gradle
+++ b/language-web/build.gradle
@@ -1,6 +1,13 @@
1apply plugin: 'java' 1plugins {
2apply from: "${rootDir}/gradle/xtext-common.gradle" 2 id 'java'
3apply from: "${rootDir}/gradle/junit.gradle" 3 id 'application'
4 alias libs.plugins.frontend
5 alias libs.plugins.shadow
6 id 'tools.refinery.xtext-conventions'
7 id 'tools.refinery.junit-conventions'
8}
9
10import org.siouan.frontendgradleplugin.infrastructure.gradle.RunNpmYarn
4 11
5dependencies { 12dependencies {
6 implementation project(':refinery-language') 13 implementation project(':refinery-language')
@@ -27,10 +34,6 @@ for (taskName in ['compileJava', 'processResources']) {
27def webpackOutputDir = "${buildDir}/webpack" 34def webpackOutputDir = "${buildDir}/webpack"
28def productionResources = "${webpackOutputDir}/production" 35def productionResources = "${webpackOutputDir}/production"
29def serverMainClass = 'tools.refinery.language.web.ServerLauncher' 36def serverMainClass = 'tools.refinery.language.web.ServerLauncher'
30
31apply plugin: libs.plugins.frontend.get().pluginId
32import org.siouan.frontendgradleplugin.infrastructure.gradle.RunNpmYarn
33
34def nodeDirectory = "${rootDir}/.gradle/node" 37def nodeDirectory = "${rootDir}/.gradle/node"
35 38
36frontend { 39frontend {
@@ -104,12 +107,10 @@ tasks.named('jar') {
104 } 107 }
105} 108}
106 109
107apply plugin: 'application'
108mainClassName = serverMainClass 110mainClassName = serverMainClass
109distTar.enabled = false 111distTar.enabled = false
110distZip.enabled = false 112distZip.enabled = false
111 113
112apply plugin: libs.plugins.shadow.get().pluginId
113shadowDistTar.enabled = false 114shadowDistTar.enabled = false
114shadowDistZip.enabled = false 115shadowDistZip.enabled = false
115 116