mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-27 00:38:11 -07:00
Return pluginUrls in FindProjectResult.
This commit is contained in:
parent
bbfcf9c375
commit
cd6c03c0c3
2 changed files with 7 additions and 4 deletions
|
@ -61,7 +61,8 @@ public class BuildFileCompiler @Inject constructor(@Assisted("buildFiles") val b
|
||||||
|
|
||||||
val parsedBuildFiles = arrayListOf<ParsedBuildFile>()
|
val parsedBuildFiles = arrayListOf<ParsedBuildFile>()
|
||||||
|
|
||||||
class FindProjectResult(val projects: List<Project>, val taskResult: TaskResult)
|
class FindProjectResult(val projects: List<Project>, val pluginUrls: List<URL>,
|
||||||
|
val taskResult: TaskResult)
|
||||||
|
|
||||||
private fun findProjects(context: KobaltContext): FindProjectResult {
|
private fun findProjects(context: KobaltContext): FindProjectResult {
|
||||||
var errorTaskResult: TaskResult? = null
|
var errorTaskResult: TaskResult? = null
|
||||||
|
@ -96,7 +97,8 @@ public class BuildFileCompiler @Inject constructor(@Assisted("buildFiles") val b
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return FindProjectResult(projects, if (errorTaskResult != null) errorTaskResult!! else TaskResult())
|
val pluginUrls = parsedBuildFiles.flatMap { it.pluginUrls }
|
||||||
|
return FindProjectResult(projects, pluginUrls, if (errorTaskResult != null) errorTaskResult!! else TaskResult())
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun maybeCompileBuildFile(context: KobaltContext, buildFile: BuildFile, buildScriptJarFile: File,
|
private fun maybeCompileBuildFile(context: KobaltContext, buildFile: BuildFile, buildScriptJarFile: File,
|
||||||
|
|
|
@ -32,9 +32,10 @@ class DependencyData @Inject constructor(val executors: KobaltExecutors, val dep
|
||||||
val buildFile = BuildFile(Paths.get(buildFilePath), "GetDependenciesCommand")
|
val buildFile = BuildFile(Paths.get(buildFilePath), "GetDependenciesCommand")
|
||||||
val buildFileCompiler = buildFileCompilerFactory.create(listOf(buildFile), pluginInfo)
|
val buildFileCompiler = buildFileCompilerFactory.create(listOf(buildFile), pluginInfo)
|
||||||
val projectResult = buildFileCompiler.compileBuildFiles(args)
|
val projectResult = buildFileCompiler.compileBuildFiles(args)
|
||||||
val pluginUrls = buildFileCompiler.parsedBuildFiles.flatMap { it.pluginUrls }
|
|
||||||
|
|
||||||
val pluginDependencies = pluginUrls.map { File(it.toURI()) }.map { FileDependency(it.absolutePath) }
|
val pluginDependencies = projectResult.pluginUrls.map { File(it.toURI()) }.map {
|
||||||
|
FileDependency(it.absolutePath)
|
||||||
|
}
|
||||||
projectResult.projects.forEach { project ->
|
projectResult.projects.forEach { project ->
|
||||||
val compileDependencies = pluginDependencies.map { toDependencyData(it, "compile") } +
|
val compileDependencies = pluginDependencies.map { toDependencyData(it, "compile") } +
|
||||||
allDeps(project.compileDependencies).map { toDependencyData(it, "compile") } +
|
allDeps(project.compileDependencies).map { toDependencyData(it, "compile") } +
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue