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:
parent
0aaa49f25b
commit
c2312a8854
4 changed files with 6 additions and 7 deletions
|
@ -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>
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue