mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-27 00:38:11 -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
|
@ -92,8 +92,9 @@ class KotlinPlugin @Inject constructor(val executors: KobaltExecutors)
|
|||
return result
|
||||
}
|
||||
|
||||
// interface IClasspathContributor
|
||||
override fun entriesFor(project: Project?): List<IClasspathDependency> =
|
||||
// IClasspathContributor
|
||||
|
||||
override fun classpathEntriesFor(project: Project?, context: KobaltContext): List<IClasspathDependency> =
|
||||
if (project == null || accept(project)) {
|
||||
// All Kotlin projects automatically get the Kotlin runtime added to their class path
|
||||
listOf(getKotlinCompilerJar("kotlin-stdlib"), getKotlinCompilerJar("kotlin-runtime"))
|
||||
|
|
|
@ -42,7 +42,7 @@ class WarGenerator @Inject constructor(val dependencyManager: DependencyManager)
|
|||
|
||||
// Run through all the classpath contributors and add their contributions to the libs/ directory
|
||||
context.pluginInfo.classpathContributors.map {
|
||||
it.entriesFor(project)
|
||||
it.classpathEntriesFor(project, context)
|
||||
}.map { deps : Collection<IClasspathDependency> ->
|
||||
deps.forEach { dep ->
|
||||
val jar = dep.jarFile.get()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue