mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-26 16:28:12 -07:00
Add a "group" to the tasks.
This commit is contained in:
parent
acb0b9bd78
commit
b53df9bcce
10 changed files with 44 additions and 20 deletions
|
@ -56,7 +56,7 @@ class DependencyData @Inject constructor(val executors: KobaltExecutors, val dep
|
|||
val sources = project.sourceDirectories.partition { KFiles.isResource(it) }
|
||||
val tests = project.sourceDirectoriesTest.partition { KFiles.isResource(it) }
|
||||
val allTasks = taskManager.tasksByNames(project).values().map {
|
||||
TaskData(it.name, it.doc)
|
||||
TaskData(it.name, it.doc, it.group)
|
||||
}
|
||||
projectDatas.add(ProjectData(project.name, project.directory, dependentProjects,
|
||||
compileDependencies, testDependencies,
|
||||
|
@ -72,7 +72,7 @@ class DependencyData @Inject constructor(val executors: KobaltExecutors, val dep
|
|||
//
|
||||
|
||||
class DependencyData(val id: String, val scope: String, val path: String)
|
||||
class TaskData(val name: String, val description: String)
|
||||
class TaskData(val name: String, val description: String, val group: String)
|
||||
|
||||
class ProjectData(val name: String, val directory: String,
|
||||
val dependentProjects: List<String>,
|
||||
|
|
|
@ -48,7 +48,7 @@ class ApplicationPlugin @Inject constructor(val configActor: ConfigActor<Applica
|
|||
|
||||
override fun apply(project: Project, context: KobaltContext) {
|
||||
super.apply(project, context)
|
||||
taskContributor.addVariantTasks(this, project, context, "run", runAfter = listOf("install"),
|
||||
taskContributor.addVariantTasks(this, project, context, "run", group = "run", runAfter = listOf("install"),
|
||||
runTask = { taskRun(project) })
|
||||
}
|
||||
|
||||
|
|
|
@ -48,7 +48,8 @@ class PackagingPlugin @Inject constructor(val dependencyManager : DependencyMana
|
|||
override fun apply(project: Project, context: KobaltContext) {
|
||||
super.apply(project, context)
|
||||
project.projectProperties.put(LIBS_DIR, KFiles.libsDir(project))
|
||||
taskContributor.addVariantTasks(this, project, context, "assemble", runAfter = listOf("compile"),
|
||||
taskContributor.addVariantTasks(this, project, context, "assemble", group = "build",
|
||||
runAfter = listOf ("compile"),
|
||||
runTask = { doTaskAssemble(project) })
|
||||
}
|
||||
|
||||
|
@ -78,7 +79,7 @@ class PackagingPlugin @Inject constructor(val dependencyManager : DependencyMana
|
|||
}}, context)
|
||||
}
|
||||
|
||||
@Task(name = TASK_ASSEMBLE, description = "Package the artifacts",
|
||||
@Task(name = TASK_ASSEMBLE, description = "Package the artifacts", group = JvmCompilerPlugin.GROUP_BUILD,
|
||||
dependsOn = arrayOf(JvmCompilerPlugin.TASK_COMPILE))
|
||||
fun doTaskAssemble(project: Project) : TaskResult {
|
||||
// Incremental assembly contributors
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue