Is there any way to rename an existing task?


(Matthew Rusinak) #1

Hello,

I’d like to add test targets for a few other types of sources, such as javascript, to a project that already has the java plugin applied. Is it possible to rename the ‘test’ target the java plugin provides to ‘testJava’ ? I’d like for ‘test’ to just have dependencies to the language specific test tasks.

Overriding the existing test task won’t work because I don’t want to get rid of the previous task, and I don’t know of any way to refer to the “super” task once overriden.

Thanks!


(Peter Niederwieser) #2

There is no API for renaming tasks. You’d have to write your own replacement for the Java plugin. Instead I’d name the new, aggregating task differently, for example ‘allTest’.


(Matthew Rusinak) #3

Thanks! That’s what I figured, but thought I’d ask just on the off-chance I was wrong :slight_smile: