I learned how to add new tasks for creating additional jars, but could not figure out how to prevent creation of the default artifact of jar task. I found project.getTasks gives the TaskContainer, but no remove method in it. Replace could be used as a workaround, but I do not like this idea. There must be a better way.
You already found the two ways to disable a task. In the upcoming milestone 5, a task can also be removed (at configuration time) with âproject.tasks.remove(mytask)â.
I really need a solution to replacing the default artifact with an obfuscated version when the obfuscate task runs. It has been quite frustrating thus far.
I have managed to get it to work when publish in. But when I have a multi-project build it is always the unobfuscated file that is passed on to dependent projects. Even though I replace the archive artifacts such that the obfuscated version is what gets published.
What is the right way to replace the default artifact?
Iâd like to bump this topic up. Iâm also very much interested in a solution.
Like swpalmer, Iâd like to overwrite the default artifact with a post-processed jar file at a different location created by a different task. Is there a solution to this?