From 720b9e2fb0968905e5a80f6099eab37554a6af58 Mon Sep 17 00:00:00 2001 From: Kristóf Marussy Date: Wed, 17 Nov 2021 03:06:39 +0100 Subject: build: move scripts into script plugins Script plugins allow applying other plugins from plugins { } blocks, which simplifies the build script. --- language-web/build.gradle | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'language-web') 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 @@ -apply plugin: 'java' -apply from: "${rootDir}/gradle/xtext-common.gradle" -apply from: "${rootDir}/gradle/junit.gradle" +plugins { + id 'java' + id 'application' + alias libs.plugins.frontend + alias libs.plugins.shadow + id 'tools.refinery.xtext-conventions' + id 'tools.refinery.junit-conventions' +} + +import org.siouan.frontendgradleplugin.infrastructure.gradle.RunNpmYarn dependencies { implementation project(':refinery-language') @@ -27,10 +34,6 @@ for (taskName in ['compileJava', 'processResources']) { def webpackOutputDir = "${buildDir}/webpack" def productionResources = "${webpackOutputDir}/production" def serverMainClass = 'tools.refinery.language.web.ServerLauncher' - -apply plugin: libs.plugins.frontend.get().pluginId -import org.siouan.frontendgradleplugin.infrastructure.gradle.RunNpmYarn - def nodeDirectory = "${rootDir}/.gradle/node" frontend { @@ -104,12 +107,10 @@ tasks.named('jar') { } } -apply plugin: 'application' mainClassName = serverMainClass distTar.enabled = false distZip.enabled = false -apply plugin: libs.plugins.shadow.get().pluginId shadowDistTar.enabled = false shadowDistZip.enabled = false -- cgit v1.2.3-54-g00ecf