Commit df68c20
authored
[Xamarin.Android.Build.Tasks] Bump $(MinimumSupportedJavaVersion)=17 (#9257)
Context: #9159 (comment)
Bump `$(MinimumSupportedJavaVersion)` to 17.0, and base this value on
the `Configurables.Defaults.MicrosoftOpenJDK17Version` value so that
if (when) we bump the JDK we build against, the major version value
of `$(MinimumSupportedJavaVersion)` follows suit.
Additionally, remove the `$(MinimumSupportedJavaVersion)` definition
in `Microsoft.Android.Sdk.DefaultProperties.targets` so that it's
only defined in one location.
This change ensures that the `@(JavaDependency)` values produced by
the `GetAndroidDependencies` target and the `$(JavaSdkDirectory)`
value produced by the `<ResolveSdks/>` task are consistent;
`<ResolveSdks/>` won't find and use JDK-11, then cause a future
`InstallAndroidDependencies` target invocation to attempt to update
the JDK-11 install to JDK-17. Bumping `$(MinimumSupportedJavaVersion)`
will prevent `<ResolveSdks/>` from using a JDK that would cause
`InstallAndroidDependencies` to error out.
If this breaks your build, you should be able to fix it by adding
the following fragment to your `.csproj`:
<PropertyGroup>
<MinimumSupportedJavaVersion>11.0</MinimumSupportedJavaVersion>
</PropertyGroup>1 parent 7aa8b84 commit df68c20
File tree
5 files changed
+4
-2
lines changed- build-tools/xaprepare/xaprepare
- Resources
- Steps
- src/Xamarin.Android.Build.Tasks
- Microsoft.Android.Sdk/targets
5 files changed
+4
-2
lines changedLines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
162 | 162 | | |
163 | 163 | | |
164 | 164 | | |
| 165 | + | |
165 | 166 | | |
166 | 167 | | |
167 | 168 | | |
| |||
Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | 5 | | |
7 | 6 | | |
8 | 7 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
199 | 199 | | |
200 | 200 | | |
201 | 201 | | |
| 202 | + | |
202 | 203 | | |
203 | 204 | | |
204 | 205 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
20 | | - | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| |||
0 commit comments