Skip to content

Commit

Permalink
Bump to Android 32.0.485 packs for .NET 6 (#7602)
Browse files Browse the repository at this point in the history
Changes: 9bf238f...619ab7a

Other changes:

* Update `AddNuGetSourcesForOlderTargetFrameworks`, to fix the `XamarinLegacySdk` test
* This allows the test to use the `dotnet6` feed when needed
  • Loading branch information
jonathanpeppers authored Dec 5, 2022
1 parent ab11fc1 commit b165bc8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Configuration.props
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
<Deterministic Condition=" '$(Deterministic)' == '' ">True</Deterministic>
<LangVersion Condition=" '$(LangVersion)' == '' ">latest</LangVersion>
<AndroidNet7Version Condition=" '$(AndroidNet7Version)' == '' ">33.0.1</AndroidNet7Version>
<AndroidNet6Version Condition=" '$(AndroidNet6Version)' == '' ">32.0.476</AndroidNet6Version>
<AndroidNet6Version Condition=" '$(AndroidNet6Version)' == '' ">32.0.485</AndroidNet6Version>
</PropertyGroup>
<PropertyGroup Condition=" '$(HostOS)' == '' ">
<HostOS Condition="$([MSBuild]::IsOSPlatform('windows'))">Windows</HostOS>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -947,7 +947,7 @@ public void XamarinLegacySdk ([Values ("net6.0-android32.0", "net7.0-android33.0
}
}
};
proj.AddNuGetSourcesForOlderTargetFrameworks ();
proj.AddNuGetSourcesForOlderTargetFrameworks (dotnetTargetFramework);

using var b = new Builder ();
var legacyTargetFrameworkVersion = "13.0";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,15 @@ public string TargetFramework {
/// <summary>
/// Projects targeting net6.0/net7.0 require ref/runtime packs on NuGet.org or dotnet6/dotnet7
/// </summary>
public void AddNuGetSourcesForOlderTargetFrameworks ()
public void AddNuGetSourcesForOlderTargetFrameworks (string targetFramework = null)
{
if (TargetFramework.IndexOf ("net6.0", StringComparison.OrdinalIgnoreCase) != -1) {
targetFramework ??= TargetFramework;
if (targetFramework.IndexOf ("net6.0", StringComparison.OrdinalIgnoreCase) != -1) {
ExtraNuGetConfigSources = new List<string> {
"https://api.nuget.org/v3/index.json",
"https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet6/nuget/v3/index.json",
};
} else if (TargetFramework.IndexOf ("net7.0", StringComparison.OrdinalIgnoreCase) != -1) {
} else if (targetFramework.IndexOf ("net7.0", StringComparison.OrdinalIgnoreCase) != -1) {
ExtraNuGetConfigSources = new List<string> {
"https://api.nuget.org/v3/index.json",
"https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet7/nuget/v3/index.json",
Expand Down

0 comments on commit b165bc8

Please sign in to comment.