Back to directory
node-gradle avatar

gradle-node-plugin

Gradle plugin for integrating NodeJS in your build. :rocket:. Read more below about its uses, features, and usage.

Clone repository

git clone https://github.com/node-gradle/gradle-node-plugin.git

677

Stars

121

Forks

11

Watchers

Apache-2.0

License

support

Gradle Plugin for Node

Build Status License Version

This plugin enables you to use a lot of Node.js-based technologies as part of your build without having Node.js installed locally on your system. It integrates the following Node.js-based system with Gradle:

The plugin is published in the Gradle plugins portal with the com.github.node-gradle.node identifier.

It supports Gradle 6.6 and newer, Node.js 10 and newer, and npm 7 or newer.

  • For npm 6 support use version 7.x
  • For Gradle 5.6.4 support use version 3.x

Documentation

⚠️ This is the documentation of the development version. See below in the releases history to read the documentation of the version you're using.

Here's how you get started using this plugin. If you do not find what you are looking for, please add an issue to GitHub Issues.

Releases History

Here's the documentation for older releases of the plugin:

Building the Plugin

Prerequisites

Some integration test ensure that this plugin is able to use the globally installed Node.js, npm or yarn tools. This requires those tools are globally installed on your system in order to get all integration tests pass.

Command

To build the plugin, just type the following command:

./gradlew build

The integration tests are run using multiple Gradle versions to ensure it works on all supported versions. But this takes a lot of time. To speed up the build, the tests run only on the current Gradle versions. To run the tests against all Gradle versions, use the following option (it is done by the CI).

./gradlew build -PtestAllSupportedGradleVersions=true

Contributing

Contributions are always welcome! If you'd like to contribute (and we hope you do) please send one of the existing contributors a nudge.

Support this project :heart:

This plugin is open source project and completely free to use. If you are using this project in your products/projects, please consider sponsoring to ensure it is actively developed and maintained.

Donate via PayPal (one time)

License

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Releases

Sep 27, 2024

Download .zip

What's Changed

Add support for ARM64 Windows #315 Add support for AIX by @ritvick in #321 Add license to pom #319

Full Changelog: 7.0.2...7.1.0

Feb 21, 2024

Download .zip

What's Changed

Prevent misconfigured workDir from removing all unrelated files #297

Full Changelog: 7.0.1...7.0.2

What's Changed

Add missing result to NodeTask #289

Full Changelog: 7.0.0...7.0.1

Aug 17, 2023

Download .zip

What's Changed

Upgrade default node to 18 (newest LTS) in #283 Always use downloaded Yarn as per documentation in #285

Full Changelog: 6.0.0...7.0.0

Aug 15, 2023

Download .zip

Removed deprecated nodeModulesDir from NodeExtension The resolved/computed node directory and platform are stored in resolvedNodeDir and resolvedPlatform on NodeExtension Fixes configuration-cache iss...