Thanks, that clarifies it. I read that ConventionTask was soon to be deprecated and one should use DefaultTask instead:
http://gradle.1045684.n5.nabble.com/Purpose-of-ConventionTask-td4533779.html Best regards Alexander On Aug 4, 2011, at 4:29 PM, Rene Groeschke wrote: > Hi, > 1. as I mentioned before, your JNITask should extend ConventionTask > 2. you need to define an according property in your Task: > > ---------- > class JNITask extends ConventionTask > { > @Input String preprocessorCommand > ... > ... > } > ---------- > > 3. you have to wire the convention property in JNIPluginConvention to a > property of your JNITask: > > ---------- > class JNIGenerator implements Plugin<Project> > { > def void apply(Project project) > { > def jniConvention = new JNIPluginConvention() > project.convention.plugins.jni = jniConvention > def jniTask = project.task('jni', type: JNITask); > jniTask.conventionMapping.preprocessorCommand = { > jniConvention.preprocessorCommand } > ... > ... > } > } > ---------- > > 4. A while ago there was a limitation, that you have to reference the task > property in the task action by its getter instead referencing it directly. I > am not sure if this is stll necessary > > > hopes this helps, > > regards, > René > > > -- > ----------------------- > regards René > > rene groeschke > http://www.breskeby.com > @breskeby > > > --------------------------------------------------------------------- > To unsubscribe from this list, please visit: > > http://xircles.codehaus.org/manage_email > > Best regards Alexander von Zitzewitz hello2morrow Inc. 1 (877) 294-6327
