Change the taskorder of a plugin

Hey guys
I try to change the order of a plugin or make the processRessources dependent on the npmRunBuild. I don’t have control over the task the only thing i execute is:
apply plugin: “com.liferay.plugin”

When I make it dependsOn it get a circular reference:

processResources.dependsOn ‘npmRunBuild’

Circular dependency between the following tasks:
:npmRunBuild
— :processResources
— :npmRunBuild (*)

Thats all the tasks that get executed:

:compileJava UP-TO-DATE
:buildCSS
Using native Sass compiler
:processResources UP-TO-DATE
:downloadNode SKIPPED
:npmInstall
:npmRunBuild
:replaceSoyTranslation UP-TO-DATE
:wrapSoyAlloyTemplate SKIPPED
:classes
:jar UP-TO-DATE
:assemble UP-TO-DATE
:build

Open for all ideas.

Regards

Marco Endres