Class NpmSetup

java.lang.Object
com.brunoritz.gradle.singularnode.npm.NpmSetup

public final class NpmSetup extends Object
Configures all required tasks and properties for the NPM package manager.
  • 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 task
      nodeInstallationTask - 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 registered installNpmPackages. Any consumer defined task of type NpmTask will automatically be made dependent on the installNpmPackages task.
      Parameters:
      project - The subproject to configure