Commit 8d7eda8
authored
Context: 5d1ac0a
Context: dotnet/android-tools@a6a23bb
Context: https://learn.microsoft.com/en-us/visualstudio/mac/what-happened-to-vs-for-mac?view=vsmac-2022
Commit 5d1ac0a had a brilliant idea:
> Of particular note is dotnet/android-tools@a6a23bb:
> [ed note: now dotnet/android-tools@a6a23bb]
>
> In order to ensure that both Xamarin.Android and the macOS installer
> use the same default version numbers for Android SDK components, we are
> now using `Xamarin.Android.Tools.Versions.props` to contain default
> version number information. This file is maintained in the
> xamarin/xamarin-android-tools repo and will be imported via
> `external/xamarin-android-tools`:
In the intervening four years (!), we've learned something, and the
environment has changed.
What we've learned is that this approach is "bump-heavy": in order to
update the default value of e.g. `$(AndroidSdkPlatformVersion)`,
we'd need to update:
1. dotnet/android-tools
2. xamarin/androidtools
3. Plus other repos that depend on (1) or (2) that are used by (4)
4. xamarin/monodroid
5. dotnet/android
This is, to put it mildly, cumbersome.
Additionally, it's no longer necessary: Visual Studio for Mac will be
retired on 2024-Aug-31, so there is no longer a need to have a common
file shared between the .NET for Android SDK and Visual Studio for Mac.
Instead of considering `Xamarin.Android.Tools.Versions.props` as the
canonical source of truth:
1. Update `Xamarin.Android.Common.targets` to now optionally include
a new `Xamarin.Installer.Common.props` file, if present.
This will allow e.g. xamarin/android-sdk-installer to eventually
provide default property values which are tied to the in-use
"Xamarin Manifest" for package installation, e.g.
`$(AndroidCommandLineToolsVersion)`, `$(JavaSdkVersion)`.
2. Update `Xamarin.Android.Common.props.in` so that the following
properties are set *before* importing
`Xamarin.Android.Tools.Versions.props`:
* `$(AndroidCommandLineToolsVersion)`
* `$(AndroidNdkVersion)`
* `$(AndroidSdkBuildToolsVersion)`
* `$(AndroidSdkEmulatorVersion)`
* `$(AndroidSdkPlatformVersion)`
* `$(AndroidSdkPlatformToolsVersion)`
* `$(JavaSdkVersion)`
This will allow us to update these values when this repo ads
support for these versions.
Finally, the ["Xamarin" manifest][0] is used by the
`InstallAndroidDependencies` target from xamarin/android-sdk-installer,
and contains only a select number of Android SDK and JDK versions.
Until android-sdk-installer provides `Xamarin.Installer.Common.props`,
the versions we use need to be in harmony with the Xamarin manifest,
so that the `InstallAndroidDependencies` tests can pass.
Explicitly set `$(AndroidNdkVersion)`=26.3.11579264, as that's the
latest version in the manifest.
[0]: https://aka.ms/AndroidManifestFeed/d17-12
1 parent 45af0b5 commit 8d7eda8
File tree
8 files changed
+36
-9
lines changed- build-tools
- scripts
- xaprepare/xaprepare
- Resources
- Steps
- src/Xamarin.Android.Build.Tasks
- Tests/Xamarin.Android.Build.Tests
8 files changed
+36
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
145 | 145 | | |
146 | 146 | | |
147 | 147 | | |
| 148 | + | |
148 | 149 | | |
149 | 150 | | |
150 | 151 | | |
| |||
174 | 175 | | |
175 | 176 | | |
176 | 177 | | |
| 178 | + | |
177 | 179 | | |
178 | 180 | | |
179 | 181 | | |
| |||
Lines changed: 1 addition & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
194 | 194 | | |
195 | 195 | | |
196 | 196 | | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
| 197 | + | |
203 | 198 | | |
204 | 199 | | |
205 | 200 | | |
Lines changed: 17 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
183 | 183 | | |
184 | 184 | | |
185 | 185 | | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
186 | 202 | | |
187 | 203 | | |
188 | 204 | | |
189 | | - | |
| 205 | + | |
190 | 206 | | |
191 | 207 | | |
192 | 208 | | |
| |||
Lines changed: 10 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | | - | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
4 | 12 | | |
5 | 13 | | |
6 | 14 | | |
| |||
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
127 | 130 | | |
128 | 131 | | |
129 | 132 | | |
| |||
0 commit comments