[build] Drop always-true _HasCommercialFiles / _AndroidFastDeploymentSupported gates#11576
Open
jonathanpeppers wants to merge 2 commits into
Open
[build] Drop always-true _HasCommercialFiles / _AndroidFastDeploymentSupported gates#11576jonathanpeppers wants to merge 2 commits into
jonathanpeppers wants to merge 2 commits into
Conversation
…Supported gates PR #11529 inlined the external/android-platform-support repo into dotnet/android. The Debugging.targets/props files and supporting assemblies (Mono.AndroidTools, Xamarin.AndroidTools, Xamarin.Installer.*, Xamarin.Android.Build.Debugging.Tasks, fastdevtools) are now always built in-tree by Xamarin.Android.sln, which makes several `Exists(...)` MSBuild gates always true. Remove the now-dead gates and their dead branches: * Drop `_HasCommercialFiles` from build-tools/installers/create-installers.targets and make the commercial `_MSBuildFiles` ItemGroup unconditional. * Drop `_AndroidFastDeploymentSupported` from Microsoft.Android.Sdk.DefaultProperties.targets, plus the dead `!= ''true''` branches of `DeployToDeviceDependsOnTargets` and `_RunDependsOn` (and the `_AndroidFastDeploymentSupported` condition on `EmbedAssembliesIntoApk` in Xamarin.Android.Common.targets). * Drop the `Exists(...)` portion of the `<Import>` conditions for Xamarin.Android.Common.Debugging.{props,targets}; keep the `''$(DesignTimeBuild)'' != ''true''` guard. * Drop now-defensive `proj.SetProperty ("_AndroidFastDeploymentSupported", "true")` calls from BuildTest.cs and InvalidConfigTests.cs. `TestEnvironment.CommercialBuildAvailable` / `BaseTest.AssertCommercialBuild()` are intentionally left for a follow-up PR. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Same reasoning as the prior commit: Xamarin.Installer.Common.targets is shipped from src/Xamarin.Installer.Build.Tasks (CopyToOutputDirectory =PreserveNewest) and is listed in the now-unconditional commercial _MSBuildFiles ItemGroup, so it is always present alongside Xamarin.Android.Common.targets. Drop the Exists(...) check and keep only the DesignTimeBuild guard. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Member
Author
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR removes now-dead MSBuild “feature detection” gates (Exists(...), _HasCommercialFiles, _AndroidFastDeploymentSupported) introduced for the former external/android-platform-support layout, reflecting that the debugging/installer components are now built in-tree.
Changes:
- Removes
_HasCommercialFilesand makes the installer/debugging_MSBuildFilesitem list unconditional. - Removes
_AndroidFastDeploymentSupportedand simplifies Debug/Deploy/Run target wiring to a single path. - Updates build tests to stop force-setting
_AndroidFastDeploymentSupported.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| build-tools/installers/create-installers.targets | Removes _HasCommercialFiles gating and unconditionally includes installer/debugging artifacts. |
| src/Xamarin.Android.Build.Tasks/Microsoft.Android.Sdk/targets/Microsoft.Android.Sdk.DefaultProperties.targets | Removes _AndroidFastDeploymentSupported property initialization. |
| src/Xamarin.Android.Build.Tasks/Microsoft.Android.Sdk/targets/Microsoft.Android.Sdk.BuildOrder.targets | Collapses DeployToDeviceDependsOnTargets to the fast-deploy path only. |
| src/Xamarin.Android.Build.Tasks/Microsoft.Android.Sdk/targets/Microsoft.Android.Sdk.Application.targets | Collapses _RunDependsOn to the _Run-based path only. |
| src/Xamarin.Android.Build.Tasks/Xamarin.Android.Common.targets | Simplifies EmbedAssembliesIntoApk defaults and removes Exists(...) from Debugging.targets import. |
| src/Xamarin.Android.Build.Tasks/Microsoft.Android.Sdk/targets/Microsoft.Android.Sdk.targets | Removes Exists(...) guard from Debugging.props import. |
| src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/BuildTest.cs | Removes _AndroidFastDeploymentSupported test scaffolding. |
| src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/InvalidConfigTests.cs | Removes _AndroidFastDeploymentSupported test scaffolding. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Follow-up to #11529, which inlined the
external/android-platform-supportrepo into dotnet/android. The Debugging.targets/props files and supporting assemblies (Mono.AndroidTools,Xamarin.AndroidTools,Xamarin.Installer.*,Xamarin.Android.Build.Debugging.Tasks,fastdevtools) are now always built in-tree byXamarin.Android.sln, so severalExists(...)MSBuild gates are always true.This PR removes those dead gates and their dead branches:
build-tools/installers/create-installers.targets– drop_HasCommercialFilesand make the commercial_MSBuildFilesItemGroupunconditional.Microsoft.Android.Sdk.DefaultProperties.targets– drop_AndroidFastDeploymentSupported.Microsoft.Android.Sdk.BuildOrder.targets– drop the'$(_AndroidFastDeploymentSupported)' == 'true'condition onDeployToDeviceDependsOnTargets; delete the dead!= 'true'branch.Microsoft.Android.Sdk.Application.targets– same treatment for_RunDependsOn; remove the now-stale comment.Xamarin.Android.Common.targets– dropExists(...)from theXamarin.Android.Common.Debugging.targetsandXamarin.Installer.Common.targetsimports (keep the'$(DesignTimeBuild)' != 'true'guards); simplify the two dead_AndroidFastDeploymentSupportedconditions onEmbedAssembliesIntoApk.Microsoft.Android.Sdk.targets– dropExists(...)from theXamarin.Android.Common.Debugging.propsimport (keep DTB guard).proj.SetProperty ("_AndroidFastDeploymentSupported", "true")calls (and the stale//NOTEcomment) fromBuildTest.csandInvalidConfigTests.cs.TestEnvironment.CommercialBuildAvailable/BaseTest.AssertCommercialBuild()are intentionally left for a follow-up PR.After this change
git grep _HasCommercialFilesandgit grep _AndroidFastDeploymentSupportedboth return zero hits.