Class YarnSetup

java.lang.Object
com.brunoritz.gradle.singularnode.yarn.YarnSetup

public final class YarnSetup extends Object
Configures all required tasks and properties for the Yarn package manager.
  • Field Details

  • 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 Yarn 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 Yarn will be registered installYarnPackages. Any consumer defined task of type YarnTask will automatically be made dependent on the installYarnPackages task.
      Parameters:
      project - The subproject to configure