@groovy.transform.CompileStatic @groovy.util.logging.Slf4j abstract class AbstractPackageWrappingExtension extends org.ysb33r.grolifant5.api.core.runnable.CombinedProjectTaskExtensionBase<AbstractPackageWrappingExtension>
A base class that can be used to wrap specific NPM packages as features in Gradle, thereby allowing for configuraton both a project or task level.
| Modifiers | Name | Description |
|---|---|---|
protected static boolean |
USE_DEFAULT_EXTENSIONS |
Whether the NodeJS & Npm extensions should be those provided by the project and tasals |
protected static boolean |
USE_EMBEDDED_EXTENSIONS |
Whether the NodeJS & Npm extensions should be created as extensions of this extensions and thus be decoupled from the normal extensions provided by this plugin suite. |
protected NodeJSExtension |
nodeJSExtension |
NodeJSExtension associated with the project or task extension |
protected NpmExtension |
npmExtension |
NpmExtension associated with the project or task extension |
| Type | Name and description |
|---|---|
NpmDependencyGroup |
installGroup |
| Constructor and description |
|---|
protected AbstractPackageWrappingExtension
(Project project, String packageName)Associate extension with a project and use default extensions. |
protected AbstractPackageWrappingExtension
(Project project, String packageName, NpmDependencyGroup installGroup, boolean embeddedExtensions)
|
protected AbstractPackageWrappingExtension
(Task task, String name)Associate extension with a task. |
protected AbstractPackageWrappingExtension
(Task task, AbstractPackageWrappingExtension projExt, boolean embeddedExtensions)Associate projExt with a task. |
| Type Params | Return Type | Name and description |
|---|---|---|
|
void |
executableByPath(Object path)Set package to be located by fixed path. |
|
void |
executableByVersion(Object ver)Set package to be resolved by version. |
|
protected abstract String |
getEntryPoint()The entrypoint path relative to the installed executable folder |
|
Provider<File> |
getExecutable()An executable entry point for a package that is suitable for execution by node. |
|
protected abstract String |
getExtensionName()Returns the name by which the extension is known. |
|
protected AbstractPackageWrappingExtension |
getGlobalPackageWrappingExtension() |
|
NpmDependencyGroup |
getInstallGroup()The installation group for this executable. |
|
void |
setInstallGroup(NpmDependencyGroup installGroup)Sets the installation group (production, development, optional). |
Whether the NodeJS & Npm extensions should be those provided by the project and tasals
Whether the NodeJS & Npm extensions should be created as extensions of this extensions and thus be decoupled from the normal extensions provided by this plugin suite. This is very useful for wrapping Node-based tools, which can potentially be used independently from any Javascript development.
NodeJSExtension associated with the project or task extension
NpmExtension associated with the project or task extension
Associate extension with a project and use default extensions. Defaults to NpmDependencyGroup.PRODUCTION.
project - Associated projectpackageName - Name of package
project - Associated projectpackageName - Name of packageinstallGroup - Install groupembeddedExtensions - Whether embedded extensions should be used.
Default is not to create embedded extensions, but use the default extensions.Associate extension with a task. @deprecated
name - Name by which project extension is known.Associate projExt with a task.
projExt - The project projExt.embeddedExtensions - Whether embedded extensions should be used.
Default is not to create embedded extensions, but use the default extensions.Set package to be located by fixed path.
path - Path to package. Anything than can be resolved using
org.ysb33r.grolifant5.api.core.FileSystemOperations#file.Set package to be resolved by version.
ver - Version. Anything that can be resolved to a valid version string.The entrypoint path relative to the installed executable folder
An executable entry point for a package that is suitable for execution by node.
Returns the name by which the extension is known. @deprecated
The installation group for this executable.
NpmDependencyGroup.PRODUCTION will be returnedSets the installation group (production, development, optional).
Groovy Documentation