1
0
Fork 0
mirror of https://github.com/ethauvin/kobalt.git synced 2025-04-26 16:28:12 -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>)
= with(dependencies) {
val deps = interceptDependencies(project, pluginInfo, this)
clear()
addAll(deps)
if (pluginInfo.classpathInterceptors.size > 0) {
val deps = interceptDependencies(project, pluginInfo, this)
clear()
addAll(deps)
} else {
this
}
}
private fun interceptDependencies(project: Project, pluginInfo: PluginInfo,