1
0
Fork 0
mirror of https://github.com/ethauvin/kobalt.git synced 2025-04-29 17:38:12 -07:00

AndroidPlugin is now a repo contributor.

This commit is contained in:
Cedric Beust 2015-11-07 10:07:29 -08:00
parent e580c3f7bd
commit 41904c0c75
5 changed files with 81 additions and 32 deletions

View file

@ -62,8 +62,20 @@ private class Main @Inject constructor(
data class RunInfo(val jc: JCommander, val args: Args)
private fun addReposFromContributors(project: Project?) =
pluginInfo.repoContributors.forEach {
it.reposFor(project).forEach {
Kobalt.addRepo(it.toString())
}
}
public fun run(jc: JCommander, args: Args) : Int {
//
// Add all the repos from repo contributors (at least those that return values without a Project)
//
addReposFromContributors(null)
//
// Add all the plugins read in plugin.xml to the Plugins singleton, so that code
// in the build file that calls Plugins.findPlugin() can find them (code in the
@ -153,6 +165,12 @@ private class Main @Inject constructor(
}
}
//
// Now that we have projects, add all the repos from repo contributors that need a Project
//
allProjects.forEach { addReposFromContributors(it) }
log(2, "Final list of repos:\n " + Kobalt.repos.joinToString("\n "))
if (args.tasks) {
//
// List of tasks