internal Dependency FindCandidate(Dependency dep)
{
foreach(string repo in repositoryPaths.Keys)
{
string repoPath;
if (repo.StartsWith("$SDK")) {
if (SDK == null || SDK.Length == 0)
{
throw new ResolutionException(AndroidSdkConfigurationError);
}
repoPath = repo.Replace("$SDK",SDK);
}
else {
repoPath = repo;
}
if (Directory.Exists(repoPath))
{
Dependency d = FindCandidate(repoPath, dep);
if (d != null)
{
return d;
}
}
else
{
Log("Repo not found: " + Path.GetFullPath(repoPath));
}
}
Log("ERROR: Unable to find dependency " + dep.Group + " " + dep.Artifact + " " +
dep.Version + " in (" +
String.Join(", ", new List<string>(repositoryPaths.Keys).ToArray()) + ")");
return null;
}