Skip to content

Allow NodeTask to be extended and exec to be overridden. #307

@pwagland

Description

@pwagland

In https://github.com/node-gradle/gradle-node-plugin/blob/main/src/main/kotlin/com/github/gradle/node/task/NodeTask.kt#L90-L99 exec is not defined as an open method, which means that tasks that extend this cannot add functionality during the execution.

In our specific case, we are using node to run SCSS, and so want to clean the target directory before calling node to populate it. I can add a second TaskAction, but there is no guarantee that this will run first, which means that sometimes I delete everything after it has been generated. Which is also not the point ;-)

I can, of course, just delegate everything, that involves a lot of boilerplate, since the there quite a few properties that should be delegated across..

So, would it be possible to make exec an open method?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions