Skip to content

Commit fedf1a4

Browse files
committed
More logging...
1 parent b34ceb7 commit fedf1a4

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

util/Xamarin.AndroidBinderator/Xamarin.AndroidBinderator/Engine.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,10 @@ static async Task ProcessConfig (BindingConfig config)
4444
BindingProjectConsistencyVerifier.Verify (models);
4545

4646
if (config.DownloadExternals)
47+
{
48+
Console.WriteLine (" Downloading Maven artifacts...");
4749
MavenArtifactDownloader.Download (config, models);
50+
}
4851

4952
// This isn't really correct, as it could be .aar, but it'll do until we hit that case and need to fix it
5053
foreach (var artifact in models.Where (a => a.MavenArtifacts.First ().MavenArtifactPackaging == "bundle"))

util/Xamarin.AndroidBinderator/Xamarin.AndroidBinderator/MavenArtifactDownloader.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ static string DownloadPayload (BindingConfig config, BindingProjectModel artifac
7070
var a = artifact.ToArtifact ();
7171

7272
if (artifact_model.MavenArtifactPackaging == "jar" || artifact_model.MavenArtifactPackaging == "aar") {
73+
Console.WriteLine ($"Downloading {a} from {repository.Name}...");
7374
if (repository.TryGetFilePath (a, FormatPayloadFileName (a, artifact_model.MavenArtifactPackaging), out var payload_path))
7475
return payload_path;
7576

@@ -78,11 +79,13 @@ static string DownloadPayload (BindingConfig config, BindingProjectModel artifac
7879

7980
// Sometimes the "MavenArtifactPackaging" isn't useful, like "bundle" for Guava or "pom" for KotlinX Coroutines.
8081
// In this case we're going to try "jar" and "aar" to try to find the real payload
82+
Console.WriteLine ($"Downloading {a} as a jar from {repository.Name}...");
8183
if (repository.TryGetFilePath (a, FormatPayloadFileName (a, "jar"), out var jar_path)) {
8284
artifact_model.MavenArtifactPackaging = "jar";
8385
return jar_path;
8486
}
8587

88+
Console.WriteLine ($"Downloading {a} as an aar from {repository.Name}...");
8689
if (repository.TryGetFilePath (a, FormatPayloadFileName (a, "aar"), out var aar_path)) {
8790
artifact_model.MavenArtifactPackaging = "aar";
8891
return aar_path;
@@ -102,18 +105,21 @@ static void DownloadAdditionalFiles (BindingConfig config, BindingProjectModel a
102105
if (config.DownloadJavaSourceJars) {
103106
var source_file = FormatMavenFileName (art) + "-sources.jar";
104107
var dest_file = base_output_file_name + "-sources.jar";
108+
Console.WriteLine ($"Downloading {art} sources jar from {repository.Name}...");
105109
TryDownloadFile (repository, art, source_file, Path.Combine (artifact_dir, dest_file));
106110
}
107111

108112
if (config.DownloadPoms) {
109113
var pom_file = FormatMavenFileName (art) + ".pom";
110114
var dest_file = base_output_file_name + ".pom";
115+
Console.WriteLine ($"Downloading {art} pom file from {repository.Name}...");
111116
TryDownloadFile (repository, art, pom_file, Path.Combine (artifact_dir, dest_file));
112117
}
113118

114119
if (config.DownloadJavaDocJars) {
115120
var javadoc_file = FormatMavenFileName (art) + "-javadoc.jar";
116121
var dest_file = base_output_file_name + "-javadoc.jar";
122+
Console.WriteLine ($"Downloading {art} javadoc jar from {repository.Name}...");
117123
TryDownloadFile (repository, art, javadoc_file, Path.Combine (artifact_dir, dest_file));
118124
}
119125
}

0 commit comments

Comments
 (0)