I have the following plugin defining a task 'jni':

class JNIGenerator implements Plugin<Project>
{
    def void apply(Project project)
    {
        project.convention.plugins.jni = new JNIPluginConvention()

        project.task('jni', type: JNITask).defineInputAndOutput();
        project.task('makeErrorInfo', type: 
MakeErrorInfoTask).defineInputAndOutput();
    }
}

class JNIPluginConvention
{
    def preprocessorCommand = "gcc -E"
    def rootClassName = "JNI"
    def packageName = "com.hello2morrow.jni"

    def jni(Closure closure)
    {
        closure.delegate = this
        closure()
    }
}


In the implementation of task jni I am accessing the convention property 
preprocessorCommand like

def cmd = preprocessorCommand

When running I get a missing property "preprocessorCommand". I thought that the 
plugin conventions are added to tasks automatically. But obviously I need to do 
something to make that happen.

Btw, me task class inherits from DefaultTask

Any help is appreciated

Best regards

Alexander von Zitzewitz

hello2morrow Inc.
1 (877) 294-6327




---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to