Plug-in task dependencies

I have a plug-in for a Slice to Java compiler that must run before the compileJava task, in the apply method we have this


See full code on github

This works well with the old dynamic configuration, but when try to use my plugin with the plugins block I get this exception

An exception occurred applying plugin request [id: '', version: '1.4.5']
> Failed to apply plugin [id '']
   > Task with name 'compileJava' not found in root project 'printer'.

My test project is just

plugins {
    // Apply the java plugin to add support for Java
    id 'java'

    // Apply the Ice builder plugin to compile Slice files to Java
    id '' version '1.4.5'

Any ideas about the right solution here?

1 Like