Europace - behind the scenes
  • Home
  • Impressum
  • Datenschutz

input

Einblicke, Gedanken, Ideen, Veranstaltungen unserer Kollegen, die Europace entwickeln

classnotfoundexception

using a nested model for your custom gradle task or plugin

You probably know about using Annotation Types for your custom Gradle plugin input values: class MyTask extends DefaultTask { @Input String aSimpleProperty @InputFile File anInputFile @Input @Optional String[] optionalProperty @OutputFile File anOutputFile @TaskAction def performTask() { // … } } Using complex task input When using a more complex input model, you can try something like this: class TaskConfiguration { String aSimpleProperty File anInputFile String[] optionalProperty } class MyTask extends DefaultTask { @Input TaskConfiguration myConfiguration @OutputFile File anOutputFile @TaskAction def performTask() { // … } } After running that task Gradle will try to serialize your TaskConfiguration, but will fail due to the missing Serializable interface declaration.

  • Tobias Gesellchen
    Tobias Gesellchen
Tobias Gesellchen 3 October 2013 • 2 min read
Europace - behind the scenes © 2013
Latest Posts Twitter Hugo Casper3 by Jonathan Janssens