Commit a963b97
[Xamarin.Android.Build.Tasks] fix installing the SDK if one doesn't exist (#4003)
Fixes #3996
Commit 008ba98 did not go far enough. Both `ValidateJavaVersion` and `ResolveSdks` also needed the same `ContinueOnError` setting. While the commit did allow users to install components which were missing, it did NOT allow users to install the entire SDK. This is because even when calling's the `InstallAndroidDependencies` target the build would still fail with
```
error XA5300: The Android SDK Directory could not be found. Please set via /p:AndroidSdkDirectory.
```
What we need to do in this case was include the `ContinueOnError` property on `ValidateJavaVersion` and `ResolveSdks`. This allows the build to continue and call the targets to install the required SDK. This is very handy for CI environments as it means we can install the Android SDK from scratch on a clean machine.1 parent 12dbe95 commit a963b97
File tree
2 files changed
+24
-0
lines changed- src/Xamarin.Android.Build.Tasks
- Tests/Xamarin.Android.Build.Tests
2 files changed
+24
-0
lines changedLines changed: 22 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4186 | 4186 | | |
4187 | 4187 | | |
4188 | 4188 | | |
| 4189 | + | |
| 4190 | + | |
| 4191 | + | |
| 4192 | + | |
| 4193 | + | |
| 4194 | + | |
| 4195 | + | |
| 4196 | + | |
| 4197 | + | |
| 4198 | + | |
| 4199 | + | |
| 4200 | + | |
| 4201 | + | |
| 4202 | + | |
| 4203 | + | |
| 4204 | + | |
| 4205 | + | |
| 4206 | + | |
| 4207 | + | |
| 4208 | + | |
| 4209 | + | |
| 4210 | + | |
4189 | 4211 | | |
4190 | 4212 | | |
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
781 | 781 | | |
782 | 782 | | |
783 | 783 | | |
| 784 | + | |
784 | 785 | | |
785 | 786 | | |
786 | 787 | | |
| |||
803 | 804 | | |
804 | 805 | | |
805 | 806 | | |
| 807 | + | |
806 | 808 | | |
807 | 809 | | |
808 | 810 | | |
| |||
0 commit comments