Skip to content

Commit d55ad28

Browse files
committed
ok that didn't work
1 parent 270fedd commit d55ad28

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/Xamarin.Android.Build.Tasks/Tasks/CollectNonEmptyDirectories.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ public override bool RunTask ()
107107
}
108108
var fileTaskItem = new TaskItem (file, new Dictionary<string, string> () {
109109
{ "ResourceDirectory", directory.ItemSpec },
110+
{ ResolveLibraryProjectImports.ResourceDirectoryArchive, directory.GetMetadata (ResolveLibraryProjectImports.ResourceDirectoryArchive) },
110111
{ "StampFile", generateArchive ? stampFile : file },
111112
{ "FilesCache", filesCache},
112113
{ "Hash", stampFile },

src/Xamarin.Android.Build.Tasks/Tasks/ResolveLibraryProjectImports.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,7 @@ void Extract (
343343
string outDirForDll = Path.Combine (OutputImportDirectory, aarIdentityName);
344344
string importsDir = Path.Combine (outDirForDll, ImportsDirectory);
345345
string resDir = Path.Combine (importsDir, "res");
346+
string resDirArchive = Path.Combine (resDir, "..", "res.zip");
346347
string assetsDir = Path.Combine (importsDir, "assets");
347348

348349
bool updated = false;
@@ -365,7 +366,7 @@ void Extract (
365366
resolvedResourceDirectories.Add (new TaskItem (Path.GetFullPath (resDir), new Dictionary<string, string> {
366367
{ OriginalFile, Path.GetFullPath (aarFile.ItemSpec) },
367368
{ AndroidSkipResourceProcessing, skipProcessing },
368-
{ ResourceDirectoryArchive, Path.GetFullPath (aarFile.ItemSpec)},
369+
{ ResourceDirectoryArchive, Path.GetFullPath (resDirArchive)},
369370
}));
370371
}
371372
if (Directory.Exists (assetsDir))
@@ -415,14 +416,15 @@ void Extract (
415416
}
416417
}
417418
if (Directory.Exists (resDir)) {
419+
CreateResourceArchive (resDir, resDirArchive);
418420
var skipProcessing = aarFile.GetMetadata (AndroidSkipResourceProcessing);
419421
if (string.IsNullOrEmpty (skipProcessing)) {
420422
skipProcessing = "True";
421423
}
422424
resolvedResourceDirectories.Add (new TaskItem (Path.GetFullPath (resDir), new Dictionary<string, string> {
423425
{ OriginalFile, aarFullPath },
424426
{ AndroidSkipResourceProcessing, skipProcessing },
425-
{ ResourceDirectoryArchive, aarFullPath},
427+
{ ResourceDirectoryArchive, resDirArchive},
426428
}));
427429
}
428430
if (Directory.Exists (assetsDir))

0 commit comments

Comments
 (0)