Class NodeJsExtension

java.lang.Object
com.brunoritz.gradle.singularnode.NodeJsExtension

public class NodeJsExtension extends Object
Allows the root project to configure the details of the tooling to be installed.
  • Field Details

    • nodeVersion

      public final org.gradle.api.provider.Property<CharSequence> nodeVersion
      The version of NodeJS to be installed. If not defined, NodeJS will not be installed and trying to call the NodeJS installation task will fail.
    • nodeDownloadBase

      public final org.gradle.api.provider.Property<CharSequence> nodeDownloadBase
      The URL from which to download NodeJS. Subdirectories will be computed via an Ivy repository (and its dependency pattern).

      Defaults to https://nodejs.org/dist.

    • npmVersion

      public final org.gradle.api.provider.Property<CharSequence> npmVersion
      The version of NPM to be installed. If not defined, NPM will not be installed and trying to call the NPM installation task will fail.
    • npmInstallArgs

      public final org.gradle.api.provider.ListProperty<CharSequence> npmInstallArgs
      Arguments to pass to NPM when installing packages.
    • yarnVersion

      public final org.gradle.api.provider.Property<CharSequence> yarnVersion
      The version of Yarn to be installed. If not defined, Yarn will not be installed and trying to call the Yarn installation task will fail.
    • yarnInstallArgs

      public final org.gradle.api.provider.ListProperty<CharSequence> yarnInstallArgs
      Arguments to pass to Yarn when installing packages.
    • pnpmVersion

      public final org.gradle.api.provider.Property<CharSequence> pnpmVersion
      The version of PNPM to be installed. If not defined, PNPM will not be installed and trying to call the PNPM installation task will fail.
    • pnpmInstallArgs

      public final org.gradle.api.provider.ListProperty<CharSequence> pnpmInstallArgs
      Arguments to pass to PNPM when installing packages.
    • installBaseDir

      public final org.gradle.api.file.DirectoryProperty installBaseDir
      The directory into wich to install NodeJS and Yarn.

      Defaults to {$rootProjectDir}/nodejs

  • Constructor Details

    • NodeJsExtension

      @Inject public NodeJsExtension(org.gradle.api.Project project)