| /******************************************************************************** |
| * Copyright (c) 2020 Contributors to the Eclipse Foundation |
| * |
| * See the NOTICE file(s) distributed with this work for additional |
| * information regarding copyright ownership. |
| * |
| * This program and the accompanying materials are made available under the |
| * terms of the Eclipse Public License 2.0 which is available at |
| * http://www.eclipse.org/legal/epl-2.0 |
| * |
| * SPDX-License-Identifier: EPL-2.0 |
| ********************************************************************************/ |
| buildscript { |
| repositories { |
| maven { |
| url "https://plugins.gradle.org/m2/" |
| } |
| } |
| |
| dependencies { |
| classpath "com.moowork.gradle:gradle-node-plugin:1.3.1" |
| } |
| } |
| |
| apply plugin: 'base' |
| apply plugin: 'com.moowork.node' |
| |
| node { |
| version = '10.14.1' |
| npmVersion = '6.4.1' |
| download = true |
| } |
| |
| npm_run_build { |
| inputs.files fileTree("public") |
| inputs.files fileTree("src") |
| inputs.file 'package.json' |
| inputs.file 'package-lock.json' |
| outputs.dir 'build' |
| } |
| |
| task copy_build(type: Copy) { |
| dependsOn npm_run_build |
| from "build" as Object |
| into "${project.rootDir}/build/static" as Object |
| } |
| |
| assemble.dependsOn copy_build |