Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Xamarin.Android.Build.Tasks] Update
CalculateProjectDependencies
t…
…o match spec (#1323) The `GetAndroidDependencies` target (f9b2c97) is intended to be called by an IDE on project-load, so that the IDE can install project dependencies "in the background," and ideally have the dependencies installed before the project is actually built. As such, the semantics of the `@(AndroidDependency)` output item group need to be agreed upon by xamarin-android, the IDEs, and whatever the IDEs use to actually install the dependencies. The `%(AndroidDependency.Identity)` values need to be well-defined and consistent across these three different libraries. In commit f9b2c97, certain values would have a version number "embedded" within `%(AndroidDependency.Identity)`, using a `;` to separate the name from the version, e.g. `build-tools;26.0.1`. Use of `;` was chosen because that made it easier for the package installation code to use (e.g. it would be identical to what the Android SDK `sdkmanager` utility expects). Unfortunately, the use of `;` was counter to the [spec][spec], and also looks "weird" in the context of MSBuild, as `;` is *also* the item group separator. Change the version separator to instead be a `/`. This "looks" better and is also consistent with the [installer manifest][manifest] schema that we will use, wherein `%(AndroidDependency.Identity)` matches a `//xamarin-android/*/@filesystem-path` attribute value: <xamarin-android sdk-version="0.0.0" generated-on="Tue, 20 Feb 2018 21:16:01 GMT"> <platform-tools filesystem-path="platform-tools" path="platform-tools" revision="27.0.1" manifest-url="https://dl.google.com/android/repository/repository2-1.xml" description="Android SDK Platform-Tools" obsolete="False" preview="False" license="android-sdk-license" original-type="generic:genericDetailsType"> <!-- ... --> </platform-tools> <build-tool filesystem-path="build-tools/27.0.3" path="build-tools;27.0.3" revision="27.0.3" manifest-url="https://dl.google.com/android/repository/repository2-1.xml" description="Android SDK Build-Tools 27.0.3" obsolete="False" preview="False" license="android-sdk-license" original-type="generic:genericDetailsType"> </build-tool> <!-- ... --> </xamarin-android> `@(AndroidDependency)` could be equivalent to: <ItemGroup> <AndroidDependency Include="build-tools/27.0.3"> <Version>27.0.3</Version> </AndroidDependency> <AndroidDependency Include="platform-tools"> <Version>$(AndroidSdkPlatformToolsVersion)</Version> </AndroidDependency> <AndroidDependency Include="platforms/android-27"> <Version>27</Version> </AndroidDependency> <AndroidDependency Include="tools"> <Version>$(AndroidSdkToolsVersion)</Version> </AndroidDependency> </ItemGroup> [manifest]: https://gist.github.com/dellis1972/08ba76cc19cdce3dec89c68684664299 [spec]: https://microsoft-my.sharepoint.com/:w:/r/personal/mhutch_microsoft_com/_layouts/15/WopiFrame.aspx?sourcedoc=%7B0436dd38-c9ff-4cf2-b33c-ee4515b68546%7D&action=edit&wdPid=64869a58
- Loading branch information