Skip to content

Commit

Permalink
[build] Bump several Android SDK components (dotnet#4819)
Browse files Browse the repository at this point in the history
System images:
  * x86-29: bumped to release 7

Tools:
  * platform-tools: bumped to v30.0.2
  • Loading branch information
grendello authored Jun 24, 2020
1 parent 2ef770d commit 044bbe5
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 3 deletions.
6 changes: 5 additions & 1 deletion Configuration.props
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,11 @@
<AllSupportedTargetAndroidAbis>$(AllSupported32BitTargetAndroidAbis);$(AllSupported64BitTargetAndroidAbis)</AllSupportedTargetAndroidAbis>
<XABuildToolsVersion>29.0.2</XABuildToolsVersion>
<XABuildToolsFolder Condition="'$(XABuildToolsFolder)' == ''">29.0.2</XABuildToolsFolder>
<XAPlatformToolsVersion>29.0.5</XAPlatformToolsVersion>

<!-- For some reason, the URL for the *macOS* version of platform-tools 30.0.2 is prefixed with what appears to be a GIT commit hash or some other checksum...
Linux and Windows packages don't have any prefix, but the macOS thing forces us to have *some* mechanism to handle this... -->
<XAPlatformToolsPackagePrefix Condition=" '$(HostOS)' == 'Darwin' ">b2be9c80582174e645d3736daa0d44d8610b38a8.</XAPlatformToolsPackagePrefix>
<XAPlatformToolsVersion>30.0.2</XAPlatformToolsVersion>
<XAIncludeProprietaryBits Condition="'$(XAIncludeProprietaryBits)' == ''">False</XAIncludeProprietaryBits>
<XABundleToolVersion Condition="'$(XABundleToolVersion)' == ''">0.14.0</XABundleToolVersion>
<XAManifestMergerToolVersion Condition="'$(XAManifestMergerToolVersion)' == ''">26.5.0</XAManifestMergerToolVersion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,6 @@ static class KnownProperties
public const string XAInstallPrefix = "XAInstallPrefix";
public const string XAPackagesDir = "XAPackagesDir";
public const string XAPlatformToolsVersion = "XAPlatformToolsVersion";
public const string XAPlatformToolsPackagePrefix = "XAPlatformToolsPackagePrefix";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ namespace Xamarin.Android.Prepare
properties.Add (KnownProperties.XAInstallPrefix, StripQuotes (@"@XAInstallPrefix@"));
properties.Add (KnownProperties.XAPackagesDir, StripQuotes (@"@XAPackagesDir@"));
properties.Add (KnownProperties.XAPlatformToolsVersion, StripQuotes ("@XAPlatformToolsVersion@"));
properties.Add (KnownProperties.XAPlatformToolsPackagePrefix, StripQuotes ("@XAPlatformToolsPackagePrefix@"));
}

string StripQuotes (string input)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,24 @@ public AndroidToolchain ()
string XABuildToolsFolder = GetRequiredProperty (KnownProperties.XABuildToolsFolder);
string XABuildToolsVersion = GetRequiredProperty (KnownProperties.XABuildToolsVersion);
string XAPlatformToolsVersion = GetRequiredProperty (KnownProperties.XAPlatformToolsVersion);
string XAPlatformToolsPackagePrefix = Context.Instance.Properties [KnownProperties.XAPlatformToolsPackagePrefix] ?? String.Empty;

// Upstream manifests with version information:
//
// https://dl-ssl.google.com/android/repository/repository2-1.xml
// * platform APIs
// * build-tools
// * command-line tools
// * sdk-tools
// * platform-tools
//
// https://dl-ssl.google.com/android/repository/addon2-1.xml
// * android_m2repository_r47
//
// https://dl-ssl.google.com/android/repository/sys-img/android/sys-img2-1.xml
// https://dl-ssl.google.com/android/repository/sys-img/google_apis/sys-img2-1.xml
// * system images
//
Components = new List<AndroidToolchainComponent> {
new AndroidPlatformComponent ("android-2.3.3_r02", apiLevel: "10", pkgRevision: "2"),
new AndroidPlatformComponent ("android-15_r05", apiLevel: "15", pkgRevision: "5"),
Expand All @@ -46,13 +63,13 @@ public AndroidToolchain ()

new AndroidToolchainComponent ("docs-24_r01", destDir: "docs", pkgRevision: "1"),
new AndroidToolchainComponent ("android_m2repository_r47", destDir: Path.Combine ("extras", "android", "m2repository"), pkgRevision: "47.0.0"),
new AndroidToolchainComponent ("x86-29_r06", destDir: Path.Combine ("system-images", "android-29", "default", "x86"), relativeUrl: new Uri ("sys-img/android/", UriKind.Relative), pkgRevision: "6"),
new AndroidToolchainComponent ($"x86-29_r07-{osTag}", destDir: Path.Combine ("system-images", "android-29", "default", "x86"), relativeUrl: new Uri ("sys-img/android/", UriKind.Relative), pkgRevision: "7"),
new AndroidToolchainComponent ($"x86_64-29_r07-{osTag}", destDir: Path.Combine ("system-images", "android-29", "default", "x86_64"), relativeUrl: new Uri ("sys-img/android/", UriKind.Relative), pkgRevision: "7"),
new AndroidToolchainComponent ($"android-ndk-r{AndroidNdkVersion}-{osTag}-x86_64", destDir: AndroidNdkDirectory, pkgRevision: AndroidPkgRevision),
new AndroidToolchainComponent ($"build-tools_r{XABuildToolsVersion}-{altOsTag}", destDir: Path.Combine ("build-tools", XABuildToolsFolder), isMultiVersion: true),
new AndroidToolchainComponent ($"commandlinetools-{cltOsTag}-{CommandLineToolsVersion}",
destDir: Path.Combine ("cmdline-tools", CommandLineToolsFolder), isMultiVersion: true),
new AndroidToolchainComponent ($"platform-tools_r{XAPlatformToolsVersion}-{osTag}", destDir: "platform-tools", pkgRevision: XAPlatformToolsVersion),
new AndroidToolchainComponent ($"{XAPlatformToolsPackagePrefix}platform-tools_r{XAPlatformToolsVersion}-{osTag}", destDir: "platform-tools", pkgRevision: XAPlatformToolsVersion),
new AndroidToolchainComponent ($"sdk-tools-{osTag}-4333796", destDir: "tools", pkgRevision: "26.1.1"),
new AndroidToolchainComponent ($"emulator-{osTag}-{EmulatorVersion}", destDir: "emulator", pkgRevision: EmulatorPkgRevision),
new AndroidToolchainComponent ($"cmake-{AndroidCmakeVersion}-{osTag}-x86_64", destDir: Path.Combine ("cmake", AndroidCmakeVersionPath), isMultiVersion: true, noSubdirectory: true, pkgRevision: "3.10.2"),
Expand Down
1 change: 1 addition & 0 deletions build-tools/xaprepare/xaprepare/xaprepare.targets
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@
<Replacement Include="@XAPlatformToolsVersion@=$(XAPlatformToolsVersion)" />
<Replacement Include="@XAInstallPrefix@=$(XAInstallPrefix)" />
<Replacement Include="@XABinRelativeInstallPrefix@=$(_XABinRelativeInstallPrefix)" />
<Replacement Include="@XAPlatformToolsPackagePrefix@=$(XAPlatformToolsPackagePrefix)" />
</ItemGroup>

<ReplaceFileContents
Expand Down

0 comments on commit 044bbe5

Please sign in to comment.