Class Lookup
java.lang.Object
com.brunoritz.gradle.singularnode.platform.Lookup
Utility methods to lookup configuration and tasks related to the NodeJS plugin.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic io.vavr.control.Option<NodeJsExtension>pluginConfiguration(org.gradle.api.Project project) Returns the configuration extension for this plugin.static io.vavr.control.Option<org.gradle.api.tasks.TaskProvider<org.gradle.api.Task>>rootProjectTask(org.gradle.api.Project project, String name) Returns an task from the root project by its name.
-
Constructor Details
-
Lookup
public Lookup()
-
-
Method Details
-
pluginConfiguration
public static io.vavr.control.Option<NodeJsExtension> pluginConfiguration(org.gradle.api.Project project) Returns the configuration extension for this plugin. If the root project does not have this plugin applied,nonewill be returned.- Parameters:
project- The project via which the root project will be accessed- Returns:
- The configuration extension or
none
-
rootProjectTask
public static io.vavr.control.Option<org.gradle.api.tasks.TaskProvider<org.gradle.api.Task>> rootProjectTask(org.gradle.api.Project project, String name) Returns an task from the root project by its name. If the given task does not exist on the root project,nonewill be returned.- Parameters:
project- The project via which the root project will be accessedname- The name of the task to return- Returns:
- The requested task or
none
-