Class NpmSetup
java.lang.Object
com.brunoritz.gradle.singularnode.npm.NpmSetup
Configures all required tasks and properties for the NPM package manager.
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidsetupChildTasks(org.gradle.api.Project project) Configures the tasks for any subproject using this plugin.static voidsetupRootTasks(org.gradle.api.Project project, org.gradle.api.tasks.TaskProvider<InstallNodeJsTask> nodeInstallationTask) Configures the tasks needed to install the NPM package manager on the root project.
-
Method Details
-
setupRootTasks
public static void setupRootTasks(org.gradle.api.Project project, org.gradle.api.tasks.TaskProvider<InstallNodeJsTask> nodeInstallationTask) Configures the tasks needed to install the NPM package manager on the root project. The setup task itself will depend on the one responsible for setting up NodeJS itself.- Parameters:
project- The root project on which to register the setup tasknodeInstallationTask- The task that installs NodeJS itself
-
setupChildTasks
public static void setupChildTasks(org.gradle.api.Project project) Configures the tasks for any subproject using this plugin. A task for installing packages via NPM will be registeredinstallNpmPackages. Any consumer defined task of typeNpmTaskwill automatically be made dependent on theinstallNpmPackagestask.- Parameters:
project- The subproject to configure
-