mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-26 16:28:12 -07:00
Unused parameter.
This commit is contained in:
parent
26115811f9
commit
4568f2f659
3 changed files with 6 additions and 9 deletions
|
@ -50,7 +50,7 @@ class TaskContributor @Inject constructor(val incrementalManager: IncrementalMan
|
||||||
runBefore = runBefore.map { variant.toTask(it) },
|
runBefore = runBefore.map { variant.toTask(it) },
|
||||||
runAfter = runAfter.map { variant.toTask(it) },
|
runAfter = runAfter.map { variant.toTask(it) },
|
||||||
alwaysRunAfter = alwaysRunAfter.map { variant.toTask(it) },
|
alwaysRunAfter = alwaysRunAfter.map { variant.toTask(it) },
|
||||||
closure = incrementalManager.toIncrementalTaskClosure(plugin, taskName, runTask)))
|
closure = incrementalManager.toIncrementalTaskClosure(taskName, runTask)))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,6 @@ package com.beust.kobalt.internal
|
||||||
|
|
||||||
import com.beust.kobalt.IncrementalTaskInfo
|
import com.beust.kobalt.IncrementalTaskInfo
|
||||||
import com.beust.kobalt.TaskResult
|
import com.beust.kobalt.TaskResult
|
||||||
import com.beust.kobalt.api.IPlugin
|
|
||||||
import com.beust.kobalt.api.Project
|
import com.beust.kobalt.api.Project
|
||||||
import com.beust.kobalt.misc.KFiles
|
import com.beust.kobalt.misc.KFiles
|
||||||
import com.beust.kobalt.misc.log
|
import com.beust.kobalt.misc.log
|
||||||
|
@ -75,11 +74,11 @@ class IncrementalManager(val fileName: String = IncrementalManager.BUILD_INFO_FI
|
||||||
* @return a closure that invokes that method and decide whether to run the task or not based
|
* @return a closure that invokes that method and decide whether to run the task or not based
|
||||||
* on the content of that IncrementalTaskInfo
|
* on the content of that IncrementalTaskInfo
|
||||||
*/
|
*/
|
||||||
fun toIncrementalTaskClosure(plugin: IPlugin, taskName: String, method: (Project) -> IncrementalTaskInfo)
|
fun toIncrementalTaskClosure(shortTaskName: String, method: (Project) -> IncrementalTaskInfo)
|
||||||
: (Project) -> TaskResult {
|
: (Project) -> TaskResult {
|
||||||
return { project: Project ->
|
return { project: Project ->
|
||||||
val iit = method(project)
|
val iit = method(project)
|
||||||
val taskName = project.name + ":" + taskName
|
val taskName = project.name + ":" + shortTaskName
|
||||||
var upToDate = false
|
var upToDate = false
|
||||||
var taskOutputChecksum : String? = null
|
var taskOutputChecksum : String? = null
|
||||||
inputChecksumFor(taskName)?.let { inputChecksum ->
|
inputChecksumFor(taskName)?.let { inputChecksum ->
|
||||||
|
@ -90,7 +89,6 @@ class IncrementalManager(val fileName: String = IncrementalManager.BUILD_INFO_FI
|
||||||
upToDate = true
|
upToDate = true
|
||||||
} else {
|
} else {
|
||||||
logIncremental(1, "Incremental task $taskName output is out of date, running it")
|
logIncremental(1, "Incremental task $taskName output is out of date, running it")
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -252,10 +252,9 @@ public class TaskManager @Inject constructor(val args: Args, val incrementalMana
|
||||||
*/
|
*/
|
||||||
fun toTaskAnnotation(method: Method, plugin: IPlugin, ta: IncrementalTask)
|
fun toTaskAnnotation(method: Method, plugin: IPlugin, ta: IncrementalTask)
|
||||||
= TaskAnnotation(method, plugin, ta.name, ta.description, ta.runBefore, ta.runAfter, ta.alwaysRunAfter,
|
= TaskAnnotation(method, plugin, ta.name, ta.description, ta.runBefore, ta.runAfter, ta.alwaysRunAfter,
|
||||||
incrementalManager.toIncrementalTaskClosure(plugin, ta.name,
|
incrementalManager.toIncrementalTaskClosure(ta.name, { project ->
|
||||||
{ project ->
|
method.invoke(plugin, project) as IncrementalTaskInfo
|
||||||
method.invoke(plugin, project) as IncrementalTaskInfo
|
}))
|
||||||
}))
|
|
||||||
|
|
||||||
class PluginDynamicTask(val plugin: IPlugin, val task: DynamicTask)
|
class PluginDynamicTask(val plugin: IPlugin, val task: DynamicTask)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue