Commit e113bc1
authored
[Xamarin.Android.Build.Tasks] .gitignore files in __AndroidLibraryProjects__.zip (dotnet#5113)
Fixes: https://developercommunity.visualstudio.com/content/problem/1141659/android-build-process-never-stops.html
Context: https://www.nuget.org/packages/Xamarin.PdfView.Android/
In addition to:
<AndroidResource Include="Resources\values\.gitignore" />
The Xamarin.PdfView.Android NuGet package causes the `<Aapt2Compile/>`
MSBuild task to hang indefinitely. This is a package last updated
11/26/2015 that has a very weird file layout:
Xamarin.PdfView.Android.1.0.4.nupkg
lib\PdfViewBinding.dll
__AndroidLibraryProjects__.zip
library_project_imports\res\.gitignore
The `res` directory is otherwise empty!
The `<CollectNonEmptyDirectories/>` MSBuild task returned:
_LibraryResourceFiles
obj\Debug\lp\0\jl\res\.gitignore
FilesCache = obj\Debug\lp\0\jl\res\..\files.cache
Hash = obj\Debug\lp\0.stamp
ResourceDirectory = obj\Debug\lp\0\jl\res
StampFile = obj\Debug\lp\0\jl\res\.gitignore
_ArchiveDirectory = obj\Debug\lp\0\jl\res\..\flat\
_FlatFile = res_.gitignore.flat
And so `obj\Debug\lp\0\jl\res\.gitignore` is passed to `aapt2 compile`.
a7f7ae6 successfully solved the issue for `.gitignore` (or any `.`
prefix) files present in a project, but not NuGet packages.
I think we should fix two things here:
1. The `aapt2 compile` command should skip files that start with `.`,
in case somehow one is passed in. We should do this because it
causes the `<Aapt2Compile/>` to hang indefinitely.
2. The `<CollectNonEmptyDirectories/>` MSBuild task should also ignore
files that start with `.`
I updated the `AndroidUpdateResourcesTest.InvalidFilenames` test so it
checks this scenario.1 parent e5d2576 commit e113bc1
File tree
7 files changed
+42
-4
lines changed- Documentation/release-notes
- src/Xamarin.Android.Build.Tasks
- Tasks
- Tests
- Xamarin.Android.Build.Tests
- Xamarin.ProjectTools/Android
7 files changed
+42
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
47 | 53 | | |
48 | 54 | | |
49 | 55 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
88 | 92 | | |
89 | 93 | | |
90 | 94 | | |
| |||
120 | 124 | | |
121 | 125 | | |
122 | 126 | | |
123 | | - | |
| 127 | + | |
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
120 | | - | |
121 | | - | |
| 120 | + | |
| 121 | + | |
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
| |||
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
103 | 107 | | |
104 | 108 | | |
105 | 109 | | |
| |||
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1386 | 1386 | | |
1387 | 1387 | | |
1388 | 1388 | | |
| 1389 | + | |
| 1390 | + | |
| 1391 | + | |
| 1392 | + | |
1389 | 1393 | | |
1390 | 1394 | | |
1391 | 1395 | | |
| |||
Lines changed: 13 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
636 | 636 | | |
637 | 637 | | |
638 | 638 | | |
639 | | - | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
640 | 652 | | |
641 | 653 | | |
642 | 654 | | |
| |||
0 commit comments