Class Node


  • public class Node
    extends java.lang.Object
    Configuration object for NodeTask derived tasks.

    build.gradle:

     javatools {
      node {
       ...
      }
     }
     
    • Constructor Summary

      Constructors 
      Constructor Description
      Node​(org.gradle.api.Project project)
      Constructs Node.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getBuildScript()
      Gets the build script to execute.
      java.io.File getNodeDistDir()
      Gets the node project's dist directory.
      java.io.File getNodeProjectDir()
      Gets the node project directory.
      java.lang.String getNpmCommand()
      Gets the npm command string to execute.
      java.lang.String getNpmVersion()
      Gets the required npm version pattern.
      java.lang.String getTestScript()
      Gets the test script to execute.
      boolean isEnabled()
      Checks whether node integration is enabled.
      void setBuildScript​(java.lang.String buildScript)
      Sets the build script to execute.
      void setEnabled​(boolean enabled)
      Enables/disables node integration.
      void setNodeDistDir​(java.io.File dir)
      Sets the node project's dist directory.
      void setNodeProjectDir​(java.io.File dir)
      Sets the node project directory.
      void setNpmCommand​(java.lang.String npmCommand)
      Sets the nom command string to execute.
      void setNpmVersion​(java.lang.String npmVersion)
      Sets the required npm version pattern.
      void setTestScript​(java.lang.String testScript)
      Sets the test script to execute.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Node

        public Node​(org.gradle.api.Project project)
        Constructs Node.
        Parameters:
        project - the owning Project.
    • Method Detail

      • isEnabled

        public boolean isEnabled()
        Checks whether node integration is enabled.

        build.gradle:

         node {
          enabled = true|false // default: false
         }
         
        Returns:
        true if node integration is enabled.
      • setEnabled

        public void setEnabled​(boolean enabled)
        Enables/disables node integration.

        build.gradle:

         node {
          enabled = true|false // default: false
         }
         
        Parameters:
        enabled - whether to enable or disable the generation of I18N helper classes.
      • getNpmCommand

        public java.lang.String getNpmCommand()
        Gets the npm command string to execute.

        If the npm executable is not inside the path or specific version has to be invoked, a fully qualified command including path has to be defined here.

        build.gradle:

         node {
          npmCommand = "npm" // default: "npm"
         }
         
        Returns:
        the npm command string to execute.
      • setNpmCommand

        public void setNpmCommand​(java.lang.String npmCommand)
        Sets the nom command string to execute.

        If the npm executable is not inside the path or specific version has to be invoked, a fully qualified command including path has to be defined here.

        build.gradle:

         node {
          npmCommand = "npm" // default: "npm"
         }
         
        Parameters:
        npmCommand - the npm command string to execute.
      • getNpmVersion

        public java.lang.String getNpmVersion()
        Gets the required npm version pattern.

        build.gradle:

         node {
          npmVersion = ".*" // default: ".*"
         }
         
        Returns:
        the required npm version pattern.
      • setNpmVersion

        public void setNpmVersion​(java.lang.String npmVersion)
        Sets the required npm version pattern.

        build.gradle:

         node {
          npmVersion = ".*" // default: ".*"
         }
         
        Parameters:
        npmVersion - the required npm version pattern.
      • getNodeProjectDir

        public java.io.File getNodeProjectDir()
        Gets the node project directory.

        build.gradle:

         node {
          nodeProjectDir = file(...) // default: file("${projectDir}/node")
         }
         
        Returns:
        the node project directory.
      • setNodeProjectDir

        public void setNodeProjectDir​(java.io.File dir)
        Sets the node project directory.

        build.gradle:

         node {
          nodeProjectDir = file(...) // default: file("${projectDir}/node")
         }
         
        Parameters:
        dir - the node project directory.
      • getNodeDistDir

        public java.io.File getNodeDistDir()
        Gets the node project's dist directory.

        build.gradle:

         node {
          nodeDistDir = file(...) // default: file("${projectDir}/node/dist")
         }
         
        Returns:
        the node project's dist directory.
      • setNodeDistDir

        public void setNodeDistDir​(java.io.File dir)
        Sets the node project's dist directory.

        build.gradle:

         node {
          nodeDistDir = file(...) // default: file("${projectDir}/node/dist")
         }
         
        Parameters:
        dir - the node project's dist directory.
      • setBuildScript

        public void setBuildScript​(java.lang.String buildScript)
        Sets the build script to execute.

        build.gradle:

         node {
          buildScript = "build" // default: "build"
         }
         
        Parameters:
        buildScript - the build script to execute.
      • getBuildScript

        public java.lang.String getBuildScript()
        Gets the build script to execute.

        build.gradle:

         node {
          buildScript = "build" // default: "build"
         }
         
        Returns:
        the build script to execute.
      • setTestScript

        public void setTestScript​(java.lang.String testScript)
        Sets the test script to execute.

        build.gradle:

         node {
          testScript = "test" // default: "test"
         }
         
        Parameters:
        testScript - the test script to execute.
      • getTestScript

        public java.lang.String getTestScript()
        Gets the test script to execute.

        build.gradle:

         node {
          testScript = "test" // default: "test"
         }
         
        Returns:
        the test script to execute.