1
0
Fork 0
mirror of https://github.com/ethauvin/kobalt.git synced 2025-04-26 00:17:11 -07:00

Default group.

This commit is contained in:
Cedric Beust 2016-05-19 22:22:07 -08:00
parent b36e417f0c
commit ee1c214346
2 changed files with 9 additions and 4 deletions

View file

@ -3,6 +3,7 @@ package com.beust.kobalt.api
import com.beust.kobalt.IncrementalTaskInfo
import com.beust.kobalt.TaskResult
import com.beust.kobalt.Variant
import com.beust.kobalt.api.annotation.AnnotationDefault
import com.beust.kobalt.internal.IncrementalManager
import com.google.inject.Inject
@ -23,7 +24,7 @@ class TaskContributor @Inject constructor(val incrementalManagerFactory: Increme
* depends on variants of that task.
*/
fun addVariantTasks(plugin: IPlugin, project: Project, context: KobaltContext, taskName: String,
group: String,
group: String = AnnotationDefault.GROUP,
dependsOn: List<String> = emptyList(),
reverseDependsOn : List<String> = emptyList(),
runBefore : List<String> = emptyList(),
@ -44,7 +45,7 @@ class TaskContributor @Inject constructor(val incrementalManagerFactory: Increme
}
fun addIncrementalVariantTasks(plugin: IPlugin, project: Project, context: KobaltContext, taskName: String,
group: String,
group: String = AnnotationDefault.GROUP,
dependsOn: List<String> = emptyList(),
reverseDependsOn : List<String> = emptyList(),
runBefore : List<String> = emptyList(),

View file

@ -6,6 +6,10 @@ package com.beust.kobalt.api.annotation
*/
annotation class Directive
object AnnotationDefault {
const val GROUP = "other"
}
@Retention(AnnotationRetention.RUNTIME)
annotation class Task(
/* This task's name */
@ -15,7 +19,7 @@ annotation class Task(
val description: String = "",
/** Used to show the task in the correct group in the IDE */
val group: String = "other",
val group: String = AnnotationDefault.GROUP,
/** Dependency: tasks this task depends on */
val dependsOn: Array<String> = arrayOf(),
@ -42,7 +46,7 @@ annotation class IncrementalTask(
val description: String = "",
/** Used to show the task in the correct group in the IDE */
val group: String = "other",
val group: String = AnnotationDefault.GROUP,
/** Dependency: tasks this task depends on */
val dependsOn: Array<String> = arrayOf(),