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

Only run the interceptors if there are any.

Otherwise, we always clear the interceptors.
This commit is contained in:
Cedric Beust 2015-12-26 00:17:41 +04:00
parent 648ccc14b9
commit 56f59fc858

View file

@ -243,9 +243,13 @@ private class Main @Inject constructor(
private fun runClasspathInterceptors(project: Project, dependencies: ArrayList<IClasspathDependency>) private fun runClasspathInterceptors(project: Project, dependencies: ArrayList<IClasspathDependency>)
= with(dependencies) { = with(dependencies) {
val deps = interceptDependencies(project, pluginInfo, this) if (pluginInfo.classpathInterceptors.size > 0) {
clear() val deps = interceptDependencies(project, pluginInfo, this)
addAll(deps) clear()
addAll(deps)
} else {
this
}
} }
private fun interceptDependencies(project: Project, pluginInfo: PluginInfo, private fun interceptDependencies(project: Project, pluginInfo: PluginInfo,