diff --git a/modules/kobalt-plugin-api/src/main/kotlin/com/beust/kobalt/internal/TaskManager.kt b/modules/kobalt-plugin-api/src/main/kotlin/com/beust/kobalt/internal/TaskManager.kt index dd2c0f59..a191c1cf 100644 --- a/modules/kobalt-plugin-api/src/main/kotlin/com/beust/kobalt/internal/TaskManager.kt +++ b/modules/kobalt-plugin-api/src/main/kotlin/com/beust/kobalt/internal/TaskManager.kt @@ -224,12 +224,13 @@ public class TaskManager @Inject constructor(val args: Args) { // Both @Task and @IncrementalTask get stored as a TaskAnnotation so they can be treated uniformly. // They only differ in the way they are invoked (see below) private val taskAnnotations = arrayListOf() + class TaskAnnotation(val method: Method, val plugin: IPlugin, val name: String, val description: String, val runBefore: Array, val runAfter: Array, val alwaysRunAfter: Array, val callable: (Project) -> TaskResult) /** - * Invoking a @Task means simply calling the method and returning its result TaskResult. + * Invoking a @Task means simply calling the method and returning its returned TaskResult. */ fun toTaskAnnotation(method: Method, plugin: IPlugin, ta: Task) = TaskAnnotation(method, plugin, ta.name, ta.description, ta.runBefore, ta.runAfter, ta.alwaysRunAfter, @@ -246,6 +247,7 @@ public class TaskManager @Inject constructor(val args: Args) { = TaskAnnotation(method, plugin, ta.name, ta.description, ta.runBefore, ta.runAfter, ta.alwaysRunAfter, { project -> val iit = method.invoke(plugin, project) as IncrementalTaskInfo + // TODO: compare the checksums with the previous run iit.task(project) })