Thank you for the replies.
@ Hallvard
> There are several gradle plugins that can run npm scripts as gradle tasks. It shouldn't be difficult to configure make the bnd tasks depend on npm tasks, so the npm ones are performed first.
I totally agree, it SHOULDN’T be hard. 😀
I want to make the ‘assemble' task depend on myTask, so I tried what is written in the gradle docs, i.e.:
assemble.dependsOn myTask
But:
> Could not get unknown property 'assemble' for root project ‘[PROJECT]' of type org.gradle.api.Project.
And so the rabbit hole starts, trying to figure out how the heck to get a handle on one of the bnd tasks. Hence my question. I think maybe there is something going on here about the way the bnd plugin works that I am not yet understanding. Or maybe just gradle plugins in general, I don’t know. For all the time I’ve been using OSGi I usually don’t have to look at gradle so even 2 or 3 years when I actually do I can never commit it to my (ever decreasing) memory. BJ is the gradle master around here, AFAIK.
@Peter
> There are two alternatives to doing this in Gradle. Advantage is that you do not have to go to the command line but can stay in Eclipse. The -generate instruction does a time/date check and executes an External Plugin or external system command:
https://bnd.bndtools.org/instructions/generate.html.
>
> If the job takes too much time for interactive use (building a single page web app, even a single one, takes a staggering amount of time imho) then you can macros to only run it at batch time.
Thanks! I forgot about the -generate instruction. I’ll give that a try. I’ve been meaning to take a look anyway.
Cheers,
=David