Commit b8192ff
committed
[Xamarin.Android.Build.Tasks] error for Android.Support
Context: #8478
Some hardcoded paths/properties in Xamarin.AndroidX.Migration cause
tests failures in #8478 such as:
(_AndroidXCecilfy target) ->
/Users/runner/.nuget/packages/xamarin.androidx.migration/1.0.8/buildTransitive/monoandroid90/Xamarin.AndroidX.Migration.targets(227,9): error : Source assembly does not exist: 'obj/Debug/android/assets/UnnamedProject.dll'.
Where `$(MonoAndroidIntermediateAssetsDir)` does not account for a new
architecture in the path:
<ItemGroup>
<_AndroidXFileToCecilfy Include="@(ResolvedUserAssemblies->'$(MonoAndroidIntermediateAssetsDir)%(Filename)%(Extension)')"
Condition="('%(ResolvedUserAssemblies.TargetFrameworkIdentifier)' == 'MonoAndroid' or '%(ResolvedUserAssemblies.HasMonoAndroidReference)' == 'true') and ('%(ResolvedUserAssemblies.AndroidXSkipAndroidXMigration)' != 'true')" />
</ItemGroup>
We don't really *support* the old Android.Support libraries or
AndroidX.Migration, but we don't have any build warnings or errors in
place for this.
Introduce a `XA1039` error in .NET 9 if any packages are found matching:
* `Xamarin.Android.Support.*`
* `Xamarin.Android.Arch.*`
The biggest impact here is going to be many of our old tests, which
use the support libraries in various forms.
Improvements & general cleanup:
* Removed all old/unused packages in `KnownPackages.cs`
* Updated `KnownPackages.cs` to latest versions, including Xamarin.Forms
* Android Wear tests are now migrated from support to AndroidX:
https://android-developers.googleblog.com/2016/04/build-beautifully-for-android-wear.html
* `CheckEmbeddedSupportLibraryResources` -> moved to AndroidX
* `BuildHasNoWarnings` was not appropriately applying `IsRelease`.
* `Android.Support.v8.RenderScript` removed in favor of inline `.so` file.
* A few tests that used support libraries to create a project large
numbers of dependencies, moved to `XamarinFormsAndroidApplicationProject`.
* `ResolveLibraryProjectImports` -> sorted comparisions
* `XamarinFormsAndroidApplicationProject` has a workaround for Guava:
dotnet/android-libraries#535
Removed tests:
* `AndroidXMigration`, `AndroidXMigrationBug`
* `ResolveLibraryImportsWithReadonlyFiles`, seemed duplicate of other
Android Wear tests, and used support libraries.
* `ExtraAaptManifest` as it depends on `Xamarin.Android.Fabric` and
`Xamarin.Android.Crashlytics`. These are deprecated and depend on
support libraries.
* `BuildProguardEnabledProjectSource` now only tests `Release` mode.
Since updating to AndroidX, `Debug` mode was triggering multi-dex.
Making it difficult to assert contents of `*.dex` files.
In a future PR, we will backport these changes, but downgrade the error
to a warning:
--<AndroidError Code="XA1039"
++<AndroidWarning Code="XA1039"
ResourceName="XA1039"
FormatArguments="9"
Condition=" '@(_AndroidUnsupportedPackages->Count())' != '0' "
/>1 parent a34988c commit b8192ff
File tree
23 files changed
+447
-843
lines changed- Documentation/guides/messages
- src/Xamarin.Android.Build.Tasks
- Properties
- Tests
- Xamarin.Android.Build.Tests
- Xamarin.ProjectTools
- Android
- Resources
- Base
- Wear
- tests/MSBuildDeviceIntegration/Tests
23 files changed
+447
-843
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1006 | 1006 | | |
1007 | 1007 | | |
1008 | 1008 | | |
| 1009 | + | |
| 1010 | + | |
| 1011 | + | |
| 1012 | + | |
| 1013 | + | |
1009 | 1014 | | |
Lines changed: 8 additions & 38 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
141 | | - | |
| 141 | + | |
142 | 142 | | |
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
| 146 | + | |
153 | 147 | | |
154 | 148 | | |
155 | 149 | | |
156 | 150 | | |
157 | | - | |
| 151 | + | |
158 | 152 | | |
159 | 153 | | |
160 | 154 | | |
| |||
410 | 404 | | |
411 | 405 | | |
412 | 406 | | |
413 | | - | |
414 | | - | |
| 407 | + | |
415 | 408 | | |
416 | 409 | | |
417 | 410 | | |
| |||
830 | 823 | | |
831 | 824 | | |
832 | 825 | | |
833 | | - | |
834 | | - | |
835 | | - | |
836 | | - | |
837 | | - | |
| 826 | + | |
838 | 827 | | |
839 | 828 | | |
840 | 829 | | |
| |||
1033 | 1022 | | |
1034 | 1023 | | |
1035 | 1024 | | |
1036 | | - | |
1037 | | - | |
1038 | | - | |
1039 | | - | |
1040 | | - | |
1041 | | - | |
1042 | | - | |
| 1025 | + | |
1043 | 1026 | | |
1044 | 1027 | | |
1045 | 1028 | | |
| |||
1224 | 1207 | | |
1225 | 1208 | | |
1226 | 1209 | | |
1227 | | - | |
1228 | | - | |
1229 | | - | |
1230 | | - | |
1231 | | - | |
1232 | | - | |
1233 | | - | |
1234 | | - | |
1235 | | - | |
1236 | | - | |
1237 | | - | |
1238 | | - | |
1239 | | - | |
1240 | | - | |
| 1210 | + | |
1241 | 1211 | | |
1242 | 1212 | | |
1243 | 1213 | | |
| |||
1257 | 1227 | | |
1258 | 1228 | | |
1259 | 1229 | | |
1260 | | - | |
| 1230 | + | |
1261 | 1231 | | |
1262 | 1232 | | |
1263 | 1233 | | |
| |||
Lines changed: 1 addition & 39 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
167 | 167 | | |
168 | 168 | | |
169 | 169 | | |
170 | | - | |
171 | 170 | | |
172 | 171 | | |
173 | 172 | | |
| |||
187 | 186 | | |
188 | 187 | | |
189 | 188 | | |
190 | | - | |
| 189 | + | |
191 | 190 | | |
192 | 191 | | |
193 | 192 | | |
194 | 193 | | |
195 | 194 | | |
196 | | - | |
197 | 195 | | |
198 | 196 | | |
199 | 197 | | |
| |||
202 | 200 | | |
203 | 201 | | |
204 | 202 | | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | | - | |
212 | | - | |
213 | | - | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | | - | |
218 | | - | |
219 | | - | |
220 | | - | |
221 | | - | |
222 | | - | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | | - | |
229 | | - | |
230 | | - | |
231 | | - | |
232 | | - | |
233 | | - | |
234 | | - | |
235 | | - | |
236 | | - | |
237 | | - | |
238 | | - | |
239 | | - | |
240 | 203 | | |
241 | 204 | | |
242 | 205 | | |
| |||
467 | 430 | | |
468 | 431 | | |
469 | 432 | | |
470 | | - | |
471 | 433 | | |
472 | 434 | | |
473 | 435 | | |
| |||
Lines changed: 10 additions & 52 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
243 | 243 | | |
244 | 244 | | |
245 | 245 | | |
246 | | - | |
247 | | - | |
248 | | - | |
249 | | - | |
250 | | - | |
251 | | - | |
252 | | - | |
253 | | - | |
254 | 246 | | |
255 | 247 | | |
256 | | - | |
| 248 | + | |
257 | 249 | | |
258 | 250 | | |
259 | 251 | | |
| |||
292 | 284 | | |
293 | 285 | | |
294 | 286 | | |
295 | | - | |
296 | | - | |
297 | | - | |
298 | | - | |
299 | 287 | | |
300 | 288 | | |
301 | 289 | | |
| |||
445 | 433 | | |
446 | 434 | | |
447 | 435 | | |
448 | | - | |
449 | | - | |
450 | | - | |
451 | | - | |
452 | | - | |
453 | | - | |
454 | | - | |
455 | | - | |
456 | | - | |
457 | | - | |
458 | | - | |
459 | | - | |
460 | | - | |
461 | | - | |
462 | | - | |
463 | | - | |
464 | | - | |
465 | | - | |
466 | | - | |
467 | | - | |
468 | 436 | | |
469 | 437 | | |
470 | 438 | | |
| |||
714 | 682 | | |
715 | 683 | | |
716 | 684 | | |
717 | | - | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
718 | 689 | | |
719 | 690 | | |
720 | 691 | | |
| |||
732 | 703 | | |
733 | 704 | | |
734 | 705 | | |
735 | | - | |
736 | | - | |
| 706 | + | |
| 707 | + | |
737 | 708 | | |
738 | 709 | | |
739 | 710 | | |
| |||
1165 | 1136 | | |
1166 | 1137 | | |
1167 | 1138 | | |
| 1139 | + | |
1168 | 1140 | | |
1169 | 1141 | | |
1170 | 1142 | | |
| |||
1436 | 1408 | | |
1437 | 1409 | | |
1438 | 1410 | | |
1439 | | - | |
1440 | | - | |
1441 | | - | |
1442 | | - | |
1443 | | - | |
1444 | | - | |
| 1411 | + | |
1445 | 1412 | | |
1446 | 1413 | | |
1447 | 1414 | | |
| |||
1458 | 1425 | | |
1459 | 1426 | | |
1460 | 1427 | | |
1461 | | - | |
1462 | 1428 | | |
1463 | 1429 | | |
1464 | 1430 | | |
1465 | 1431 | | |
1466 | 1432 | | |
1467 | 1433 | | |
1468 | | - | |
1469 | 1434 | | |
1470 | 1435 | | |
1471 | 1436 | | |
| |||
1621 | 1586 | | |
1622 | 1587 | | |
1623 | 1588 | | |
1624 | | - | |
1625 | | - | |
1626 | | - | |
1627 | | - | |
1628 | | - | |
1629 | | - | |
| 1589 | + | |
1630 | 1590 | | |
1631 | 1591 | | |
1632 | 1592 | | |
1633 | 1593 | | |
1634 | 1594 | | |
1635 | | - | |
1636 | 1595 | | |
1637 | 1596 | | |
1638 | 1597 | | |
1639 | 1598 | | |
1640 | 1599 | | |
1641 | 1600 | | |
1642 | | - | |
1643 | 1601 | | |
1644 | 1602 | | |
1645 | 1603 | | |
| |||
0 commit comments