mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-26 08:27:12 -07:00
Default group.
This commit is contained in:
parent
b36e417f0c
commit
ee1c214346
2 changed files with 9 additions and 4 deletions
|
@ -3,6 +3,7 @@ package com.beust.kobalt.api
|
||||||
import com.beust.kobalt.IncrementalTaskInfo
|
import com.beust.kobalt.IncrementalTaskInfo
|
||||||
import com.beust.kobalt.TaskResult
|
import com.beust.kobalt.TaskResult
|
||||||
import com.beust.kobalt.Variant
|
import com.beust.kobalt.Variant
|
||||||
|
import com.beust.kobalt.api.annotation.AnnotationDefault
|
||||||
import com.beust.kobalt.internal.IncrementalManager
|
import com.beust.kobalt.internal.IncrementalManager
|
||||||
import com.google.inject.Inject
|
import com.google.inject.Inject
|
||||||
|
|
||||||
|
@ -23,7 +24,7 @@ class TaskContributor @Inject constructor(val incrementalManagerFactory: Increme
|
||||||
* depends on variants of that task.
|
* depends on variants of that task.
|
||||||
*/
|
*/
|
||||||
fun addVariantTasks(plugin: IPlugin, project: Project, context: KobaltContext, taskName: String,
|
fun addVariantTasks(plugin: IPlugin, project: Project, context: KobaltContext, taskName: String,
|
||||||
group: String,
|
group: String = AnnotationDefault.GROUP,
|
||||||
dependsOn: List<String> = emptyList(),
|
dependsOn: List<String> = emptyList(),
|
||||||
reverseDependsOn : List<String> = emptyList(),
|
reverseDependsOn : List<String> = emptyList(),
|
||||||
runBefore : 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,
|
fun addIncrementalVariantTasks(plugin: IPlugin, project: Project, context: KobaltContext, taskName: String,
|
||||||
group: String,
|
group: String = AnnotationDefault.GROUP,
|
||||||
dependsOn: List<String> = emptyList(),
|
dependsOn: List<String> = emptyList(),
|
||||||
reverseDependsOn : List<String> = emptyList(),
|
reverseDependsOn : List<String> = emptyList(),
|
||||||
runBefore : List<String> = emptyList(),
|
runBefore : List<String> = emptyList(),
|
||||||
|
|
|
@ -6,6 +6,10 @@ package com.beust.kobalt.api.annotation
|
||||||
*/
|
*/
|
||||||
annotation class Directive
|
annotation class Directive
|
||||||
|
|
||||||
|
object AnnotationDefault {
|
||||||
|
const val GROUP = "other"
|
||||||
|
}
|
||||||
|
|
||||||
@Retention(AnnotationRetention.RUNTIME)
|
@Retention(AnnotationRetention.RUNTIME)
|
||||||
annotation class Task(
|
annotation class Task(
|
||||||
/* This task's name */
|
/* This task's name */
|
||||||
|
@ -15,7 +19,7 @@ annotation class Task(
|
||||||
val description: String = "",
|
val description: String = "",
|
||||||
|
|
||||||
/** Used to show the task in the correct group in the IDE */
|
/** 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 */
|
/** Dependency: tasks this task depends on */
|
||||||
val dependsOn: Array<String> = arrayOf(),
|
val dependsOn: Array<String> = arrayOf(),
|
||||||
|
@ -42,7 +46,7 @@ annotation class IncrementalTask(
|
||||||
val description: String = "",
|
val description: String = "",
|
||||||
|
|
||||||
/** Used to show the task in the correct group in the IDE */
|
/** 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 */
|
/** Dependency: tasks this task depends on */
|
||||||
val dependsOn: Array<String> = arrayOf(),
|
val dependsOn: Array<String> = arrayOf(),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue