-
Notifications
You must be signed in to change notification settings - Fork 533
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Xamarin.Android.Build.Tasks] Rethink default property values (#9155) #9224
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jonpryor
requested review from
dellis1972,
jonathanpeppers and
grendello
as code owners
August 19, 2024 18:21
dellis1972
approved these changes
Aug 20, 2024
grendello
approved these changes
Aug 20, 2024
Looks like the
|
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
jonpryor
force-pushed
the
dev/jonp/jonp-cp-9155
branch
from
August 20, 2024 19:44
b8e08c2
to
e78a54f
Compare
jonathanpeppers
added a commit
that referenced
this pull request
Aug 22, 2024
Changes: 34.0.113...b0fd011 .NET 8 changelog: * [Mono.Android] AndroidMessageHandler should follow HTTP-308 redirects (#8951) * [ci] Fix android source path for MAUI test job (#9030) * [ci] Update checkout path for nightly build (#9028) * [Mono.Android-Tests] Fix repo URL in redirect tests (#9035) * [Xamarin.Android.Build.Tasks] Support VS "Build Acceleration" (#9042) * [xaprepare] Always use release mono bundle (#9106) * [ci] Update sdk-insertions trigger to manual only (#9029) * Bump to dotnet/runtime@4a37e7305c 8.0.8 (#9033) * Bump to dotnet/installer@b638a84fba 8.0.205-servicing.24212.27 (#9032) * [ci] Disable CodeQL on macOS, Linux, non-main jobs (#9111) * [ci] Use DotNetCoreCLI to sign macOS files (#9102) * [tests] fix `InvalidTargetPlatformVersion` for `net8.0` (#9110) * [ci] Run "Push Internal" job on AzurePipelines-EO pool (#8991) * Bump to dotnet/runtime@2d5c0b720c 8.0.8 (#9123) * [Mono.Android] Data sharing and Close() overrides (#9103) * [Xamarin.Android.Build.Tasks] fix `Inputs` for `_Generate*Java*` targets (#9174) * Bump to xamarin/monodroid@e6a7cf474a (#9193) * [release/8.0.4xx] Backport maestro and artifact drop infra improvements (#9195) * Bump to dotnet/runtime@62f69f1e86 8.0.9 (#9191) * Bump to dotnet/runtime@ed13b35174 8.0.9 (#9221) * [build] Update package metadata (#9230) * [Xamarin.Android.Build.Tasks] Rethink default property values (#9155) (#9224) * [Xamarin.Android.Build.Tasks] Fix an issue with incremental builds (#9183) * [ci] Improve push_signed_nugets job condition (#9240)
jonathanpeppers
added a commit
that referenced
this pull request
Aug 23, 2024
Changes: 34.0.113...b0fd011 .NET 8 changelog: * [Mono.Android] AndroidMessageHandler should follow HTTP-308 redirects (#8951) * [ci] Fix android source path for MAUI test job (#9030) * [ci] Update checkout path for nightly build (#9028) * [Mono.Android-Tests] Fix repo URL in redirect tests (#9035) * [Xamarin.Android.Build.Tasks] Support VS "Build Acceleration" (#9042) * [xaprepare] Always use release mono bundle (#9106) * [ci] Update sdk-insertions trigger to manual only (#9029) * Bump to dotnet/runtime@4a37e7305c 8.0.8 (#9033) * Bump to dotnet/installer@b638a84fba 8.0.205-servicing.24212.27 (#9032) * [ci] Disable CodeQL on macOS, Linux, non-main jobs (#9111) * [ci] Use DotNetCoreCLI to sign macOS files (#9102) * [tests] fix `InvalidTargetPlatformVersion` for `net8.0` (#9110) * [ci] Run "Push Internal" job on AzurePipelines-EO pool (#8991) * Bump to dotnet/runtime@2d5c0b720c 8.0.8 (#9123) * [Mono.Android] Data sharing and Close() overrides (#9103) * [Xamarin.Android.Build.Tasks] fix `Inputs` for `_Generate*Java*` targets (#9174) * Bump to xamarin/monodroid@e6a7cf474a (#9193) * [release/8.0.4xx] Backport maestro and artifact drop infra improvements (#9195) * Bump to dotnet/runtime@62f69f1e86 8.0.9 (#9191) * Bump to dotnet/runtime@ed13b35174 8.0.9 (#9221) * [build] Update package metadata (#9230) * [Xamarin.Android.Build.Tasks] Rethink default property values (#9155) (#9224) * [Xamarin.Android.Build.Tasks] Fix an issue with incremental builds (#9183) * [ci] Improve push_signed_nugets job condition (#9240) ~~ Other changes ~~ * Setup Maestro to track .NET8 builds After setting up the appropriate changes in `Version.Details.xml`, I ran: > darc update-dependencies --id 235947 Looking up build with BAR id 235947 Updating 'Microsoft.Android.Sdk.Windows': '1' => '34.0.137' (from build '8.0.4xx- b0fd011-1' of 'https://github.com/dotnet/android') Checking for coherency updates... Using 'Strict' coherency mode. If this fails, a second attempt utilizing 'Legacy' Coherency mode will be made. Local dependencies updated based on build with BAR id 235947 (8.0.4xx-b0fd0113c829edd9bd1bc7d742255a237ff19f69-1 from https://github.com/dotnet/android@release/8.0.4xx)
jonathanpeppers
added a commit
that referenced
this pull request
Aug 23, 2024
Changes: 34.0.113...b0fd011 .NET 8 changelog: * [Mono.Android] AndroidMessageHandler should follow HTTP-308 redirects (#8951) * [ci] Fix android source path for MAUI test job (#9030) * [ci] Update checkout path for nightly build (#9028) * [Mono.Android-Tests] Fix repo URL in redirect tests (#9035) * [Xamarin.Android.Build.Tasks] Support VS "Build Acceleration" (#9042) * [xaprepare] Always use release mono bundle (#9106) * [ci] Update sdk-insertions trigger to manual only (#9029) * Bump to dotnet/runtime@4a37e7305c 8.0.8 (#9033) * Bump to dotnet/installer@b638a84fba 8.0.205-servicing.24212.27 (#9032) * [ci] Disable CodeQL on macOS, Linux, non-main jobs (#9111) * [ci] Use DotNetCoreCLI to sign macOS files (#9102) * [tests] fix `InvalidTargetPlatformVersion` for `net8.0` (#9110) * [ci] Run "Push Internal" job on AzurePipelines-EO pool (#8991) * Bump to dotnet/runtime@2d5c0b720c 8.0.8 (#9123) * [Mono.Android] Data sharing and Close() overrides (#9103) * [Xamarin.Android.Build.Tasks] fix `Inputs` for `_Generate*Java*` targets (#9174) * Bump to xamarin/monodroid@e6a7cf474a (#9193) * [release/8.0.4xx] Backport maestro and artifact drop infra improvements (#9195) * Bump to dotnet/runtime@62f69f1e86 8.0.9 (#9191) * Bump to dotnet/runtime@ed13b35174 8.0.9 (#9221) * [build] Update package metadata (#9230) * [Xamarin.Android.Build.Tasks] Rethink default property values (#9155) (#9224) * [Xamarin.Android.Build.Tasks] Fix an issue with incremental builds (#9183) * [ci] Improve push_signed_nugets job condition (#9240) ~~ Other changes ~~ * Setup Maestro to track .NET8 builds After setting up the appropriate changes in `Version.Details.xml`, I ran: > darc update-dependencies --id 235947 Looking up build with BAR id 235947 Updating 'Microsoft.Android.Sdk.Windows': '1' => '34.0.137' (from build '8.0.4xx- b0fd011-1' of 'https://github.com/dotnet/android') Checking for coherency updates... Using 'Strict' coherency mode. If this fails, a second attempt utilizing 'Legacy' Coherency mode will be made. Local dependencies updated based on build with BAR id 235947 (8.0.4xx-b0fd0113c829edd9bd1bc7d742255a237ff19f69-1 from https://github.com/dotnet/android@release/8.0.4xx)
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
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: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:Update
Xamarin.Android.Common.targets
to now optionally include a newXamarin.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)
.Update
Xamarin.Android.Common.props.in
so that the following properties are set before importingXamarin.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 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 theInstallAndroidDependencies
tests can pass.Explicitly set
$(AndroidNdkVersion)
=26.3.11579264, as that's the latest version in the manifest.