Commit 7852b2d
committed
[One .NET] Fix <InstallAndroidDependencies/> target and test
Context: xamarin/android-sdk-installer#450
A fix for the `<InstallAndroidDependencies/>` target has been brought in
via the `android-sdk-installer` bump.
The `<ResolveAndroidTooling/>` task has been updated to ensure that the
`AndroidApilevel` output will be set regardless of whether or not the
task fails when detecting Android SDK components. This allows Android
SDK provisioning to succeed for One .NET builds when the Android SDK is
missing entirely or just missing some components. Previous behavior
attempted to determine which `android.jar` to install based on the
`$(TargetFrameworkVersion)` of the project, which is not a valid
comparison in One .NET projects.
The `<InstallAndroidDependencies/>` test previously had issues due to
clean up logic in the test framework that partially deleted the newly
provisioned Android SDK on a subsequent build. I believe that we've
been seeing successful results for this test because the subsequent
build in the test would fall back to a different Android SDK that was
already on disk. The test has been improved by asserting that the newly
installed Android SDK is used during the subsequent build.1 parent 0907f09 commit 7852b2d
File tree
3 files changed
+11
-5
lines changed- src/Xamarin.Android.Build.Tasks
- Tasks
- Tests/Xamarin.Android.Build.Tests
3 files changed
+11
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
| 82 | + | |
82 | 83 | | |
83 | 84 | | |
84 | 85 | | |
| |||
192 | 193 | | |
193 | 194 | | |
194 | 195 | | |
195 | | - | |
196 | | - | |
| 196 | + | |
197 | 197 | | |
198 | 198 | | |
199 | 199 | | |
| |||
Lines changed: 8 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
22 | 25 | | |
23 | 26 | | |
| 27 | + | |
24 | 28 | | |
25 | 29 | | |
26 | 30 | | |
27 | 31 | | |
28 | | - | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
29 | 35 | | |
30 | 36 | | |
31 | 37 | | |
| |||
0 commit comments