Package de.carne.gradle.plugin.java.ext
Class Node
- java.lang.Object
-
- de.carne.gradle.plugin.java.ext.Node
-
public class Node extends java.lang.Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetBuildScript()Gets the build script to execute.java.io.FilegetNodeDistDir()Gets the node project's dist directory.java.io.FilegetNodeProjectDir()Gets the node project directory.java.lang.StringgetNpmCommand()Gets the npm command string to execute.java.lang.StringgetNpmVersion()Gets the required npm version pattern.java.lang.StringgetTestScript()Gets the test script to execute.booleanisEnabled()Checks whether node integration is enabled.voidsetBuildScript(java.lang.String buildScript)Sets the build script to execute.voidsetEnabled(boolean enabled)Enables/disables node integration.voidsetNodeDistDir(java.io.File dir)Sets the node project's dist directory.voidsetNodeProjectDir(java.io.File dir)Sets the node project directory.voidsetNpmCommand(java.lang.String npmCommand)Sets the nom command string to execute.voidsetNpmVersion(java.lang.String npmVersion)Sets the required npm version pattern.voidsetTestScript(java.lang.String testScript)Sets the test script to execute.
-
-
-
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:
trueif 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.
-
-