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

Warnings.

This commit is contained in:
Cedric Beust 2015-11-06 19:48:27 -08:00
parent 23cb52cacf
commit 62a17ab67c

View file

@ -38,9 +38,9 @@ public class TaskManager @Inject constructor(val plugins: Plugins, val args: Arg
constructor(project: String, task: String) : this(project + ":" + task) constructor(project: String, task: String) : this(project + ":" + task)
val project: String? val project: String?
get() = if (id.contains(":")) id.split(":").get(0) else null get() = if (id.contains(":")) id.split(":")[0] else null
val task: String val task: String
get() = if (id.contains(":")) id.split(":").get(1) else id get() = if (id.contains(":")) id.split(":")[1] else id
fun matches(projectName: String) = project == null || project == projectName fun matches(projectName: String) = project == null || project == projectName
} }
@ -88,7 +88,7 @@ public class TaskManager @Inject constructor(val plugins: Plugins, val args: Arg
// //
// Add the transitive closure of the current task as edges to the graph // Add the transitive closure of the current task as edges to the graph
// //
val transitiveClosure = calculateTransitiveClosure(project, tasksByNames, ti, task) val transitiveClosure = calculateTransitiveClosure(project, tasksByNames, ti)
transitiveClosure.forEach { pluginTask -> transitiveClosure.forEach { pluginTask ->
val rb = runBefore.get(pluginTask.name) val rb = runBefore.get(pluginTask.name)
rb.forEach { rb.forEach {
@ -161,8 +161,7 @@ public class TaskManager @Inject constructor(val plugins: Plugins, val args: Arg
/** /**
* Find the transitive closure for the given TaskInfo * Find the transitive closure for the given TaskInfo
*/ */
private fun calculateTransitiveClosure(project: Project, tasksByNames: Map<String, PluginTask>, ti: TaskInfo, private fun calculateTransitiveClosure(project: Project, tasksByNames: Map<String, PluginTask>, ti: TaskInfo): HashSet<PluginTask> {
task: PluginTask): HashSet<PluginTask> {
log(3, "Processing ${ti.task}") log(3, "Processing ${ti.task}")
val transitiveClosure = hashSetOf<PluginTask>() val transitiveClosure = hashSetOf<PluginTask>()