gradle-postman-runner
gradle-postman-runner copied to clipboard
Use actively maintained node plugin
The node plugin you are using is causing problems for me (with Gradle 6):
Execution failed for task ':nodeSetup'.
> Could not resolve all files for configuration ':detachedConfiguration1'.
> Could not find org.nodejs:node:15.9.0.
Searched in the following locations:
- https://nodejs.org/dist/v15.9.0/ivy.xml
The problem is described in the github repo for gradle plugin com.moowork.node. Someone writes there:
There's an actively maintained fork at https://github.com/node-gradle/gradle-node-plugin
(moowork was updated last in 2019, the fork is being actively developed).
I tried adding plugins { "com.github.node-gradle.node" version "3.0.1"}
to my build.gradle, but that gives me
An exception occurred applying plugin request [id: 'com.github.michaelruocco.gradle-postman-runner', version: '0.1.3']
> Failed to apply plugin 'com.moowork.node'.
> Cannot add extension with name 'node', as there is an extension already registered with that name.
e.g. com.github.node-gradle.node and com.moowork.node are conflicting. Could you please switch to using the actively maintained branch?
@hosswald Did you find any workaround to this ?
I'm looking into this, but can't promise to get a decent port to gradle-node-plugin yet.
Thanks for responding @simomat.
What kind of a challenge are we looking at ? Are the APIs of the two plugins completely different (in this case we are looking at substantial amount of re-work).
Asking to get a better idea whether this is something worthwhile to pursue for me and what kind of effort is required. I am completely new to gradle plugins and have to start from the very beginning.
I did look at this before, and to be honest I struggled, it wasn't really a simple port from one plugin to the other. It is a reasonable amount of rework, and I ran into a couple of blockers, although it was a good year or so ago now, so I can't remember what the specifics were. I would have to try again to try and remind myself.
In some of my projects, I have found that not using this plugin at all and just using the id "com.github.node-gradle.node"
plugin directly worked okay, so this could potentially be a reasonable alternative for you guys too?
e.g. https://github.com/michaelruocco/idv-context/blob/master/app/spring/build.gradle#L126-L139