Hi Alexander,
can you post your task class too? Btw.: The class should implement ConventionTask.

regards,
Rene
Am 04.08.11 22:03, schrieb Alexander von Zitzewitz:
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





--
-----------------------
regards René

rene groeschke
http://www.breskeby.com
@breskeby


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

   http://xircles.codehaus.org/manage_email


Reply via email to