Skip to content

Commit

Permalink
[build] Allow overriding mono's ANDROID_PLATFORM_TOOLS_VERSION (#1944)
Browse files Browse the repository at this point in the history
Context: mono/mono#9473 (comment)
Context: #1858

Before [mono/mono:master@52dccf8c][m52dc]
([mono:2018-02@077307fc][m0773]), mono would hardcode the
`platform-tools` version to be installed, meaning if xamarin-android
*wanted* to install a newer `platform-tools` version (#1858),
*we couldn't*, because mono controlled that.

Altering the `platform-tools` version would require altering and
bumping mono.

In [mono/mono:master@52dccf8c][m52dc], mono now allows
xamarin-android to explicitly specify the `platform-tools` version
to install, by overriding the `$(ANDROID_PLATFORM_TOOLS_VERSION)`
make variable.

Introduce a new `$(XAPlatformToolsVersion)` MSBuild property to
control mono's `$(ANDROID_PLATFORM_TOOLS_VERSION)` value, allowing
xamarin-android to control and update this value in the future.

[m52dc]: mono/mono@52dccf8
[m0773]: mono/mono@077307f
  • Loading branch information
atsushieno authored and jonpryor committed Jul 20, 2018
1 parent a4cd25b commit 8b7411b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions Configuration.props
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@
<AllSupportedTargetAndroidAbis>$(AllSupported32BitTargetAndroidAbis);$(AllSupported64BitTargetAndroidAbis)</AllSupportedTargetAndroidAbis>
<XABuildToolsVersion>28</XABuildToolsVersion>
<XABuildToolsFolder Condition="'$(XABuildToolsFolder)' == ''">28.0.0</XABuildToolsFolder>
<XAPlatformToolsVersion>28.0.0</XAPlatformToolsVersion>
<XAIntegratedTests Condition="'$(XAIntegratedTests)' == ''">False</XAIntegratedTests>
<XAIncludeProprietaryBits Condition="'$(XAIncludeProprietaryBits)' == ''">False</XAIncludeProprietaryBits>
<PathSeparator>$([System.IO.Path]::PathSeparator)</PathSeparator>
Expand Down
2 changes: 1 addition & 1 deletion build-tools/android-toolchain/android-toolchain.targets
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
DependsOnTargets="_PrepareAndroidToolchainItems"
Outputs="@(_AndroidSdkStampFiles);@(_AndroidNdkStampFiles);@(_AntStampFiles)">
<Exec
Command="make $(MakeConcurrency) provision-android DISABLE_IOS=1 ANDROID_TOOLCHAIN_DIR=&quot;$(AndroidToolchainDirectory)&quot; ANDROID_TOOLCHAIN_CACHE_DIR=&quot;$(AndroidToolchainCacheDirectory)&quot; ANDROID_TOOLCHAIN_PREFIX=&quot;$(AndroidToolchainDirectory)\toolchains&quot; ANDROID_BUILD_TOOLS_VERSION=&quot;$(XABuildToolsVersion)&quot; ANDROID_BUILD_TOOLS_DIR=&quot;$(XABuildToolsFolder)&quot;"
Command="make $(MakeConcurrency) provision-android DISABLE_IOS=1 ANDROID_TOOLCHAIN_DIR=&quot;$(AndroidToolchainDirectory)&quot; ANDROID_TOOLCHAIN_CACHE_DIR=&quot;$(AndroidToolchainCacheDirectory)&quot; ANDROID_TOOLCHAIN_PREFIX=&quot;$(AndroidToolchainDirectory)\toolchains&quot; ANDROID_BUILD_TOOLS_VERSION=&quot;$(XABuildToolsVersion)&quot; ANDROID_BUILD_TOOLS_DIR=&quot;$(XABuildToolsFolder)&quot; ANDROID_PLATFORM_TOOLS=&quot;$(XAPlatformToolsVersion)&quot;"
WorkingDirectory="$(MonoSourceFullPath)\sdks\builds"
/>
</Target>
Expand Down

0 comments on commit 8b7411b

Please sign in to comment.