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

Make IClasspathContributor receive a Context.

This commit is contained in:
Cedric Beust 2016-02-10 21:42:29 +04:00
parent 0aaa49f25b
commit c2312a8854
4 changed files with 6 additions and 7 deletions

View file

@ -1,12 +1,10 @@
package com.beust.kobalt.api
import com.beust.kobalt.api.IClasspathDependency
/**
* Plugins that export classpath entries need to implement this interface.
*/
interface IClasspathContributor : IContributor {
fun entriesFor(project: Project?) : Collection<IClasspathDependency>
fun classpathEntriesFor(project: Project?, context: KobaltContext) : Collection<IClasspathDependency>
}

View file

@ -41,7 +41,7 @@ public class DependencyManager @Inject constructor(val executors: KobaltExecutor
Collection<IClasspathDependency> {
val result = hashSetOf<IClasspathDependency>()
context.pluginInfo.classpathContributors.forEach { it: IClasspathContributor ->
result.addAll(it.entriesFor(project))
result.addAll(it.classpathEntriesFor(project, context))
}
return result
}