Skip to content
This repository has been archived by the owner on Nov 6, 2024. It is now read-only.

Remove Classic support. #863

Merged
merged 3 commits into from
May 3, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Remove Classic support.
  • Loading branch information
jpobst committed May 1, 2024
commit 564e073d0d7ea39bd522039d7325ca98f5ac8f22
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<RepositoryType>git</RepositoryType>

<!-- Default TFM's we build for -->
<_DefaultTargetFrameworks>MonoAndroid12.0;net6.0-android;net7.0-android</_DefaultTargetFrameworks>
<_DefaultTargetFrameworks>net7.0-android</_DefaultTargetFrameworks>

<!-- Use an updated 'generator' -->
<!-- It's ok to use "Windows" here because we only use managed code from this package -->
Expand Down
2 changes: 1 addition & 1 deletion azure-pipelines.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ resources:
type: github
name: xamarin/androidx
endpoint: xamarin
ref: refs/heads/main
ref: refs/heads/no-classic

extends:
template: v1/1ES.Official.PipelineTemplate.yml@1esPipelines
Expand Down
101 changes: 0 additions & 101 deletions build.cake
Original file line number Diff line number Diff line change
Expand Up @@ -817,105 +817,6 @@ Task("samples-directory-build-targets")
}
);

Task("samples")
.IsDependentOn("libs")
.IsDependentOn("samples-directory-build-targets")
.IsDependentOn("samples-only")
.IsDependentOn("samples-only-dotnet")
;

Task("samples-only")
.IsDependentOn("samples-directory-build-targets")
.IsDependentOn("mergetargets")
.IsDependentOn("allbindingprojectrefs")
.Does
(
() =>
{
Configs = new string[] { "Debug", "Release" };

DeleteDirectories(GetDirectories("./samples/**/bin/"), new DeleteDirectorySettings() { Force = true, Recursive = true });
DeleteDirectories(GetDirectories("./samples/**/obj/"), new DeleteDirectorySettings() { Force = true, Recursive = true });

EnsureDirectoryExists($@"./output/failed/");

var sampleSlns = GetFiles("./samples/all/**/*.sln")
.Concat(GetFiles("./samples/com.google.android.gms/**/*.sln"))
.Concat(GetFiles("./samples/com.google.firebase/**/*.sln"))
;

foreach(string config in Configs)
{
foreach (var sampleSln in sampleSlns)
{
string filename_sln = sampleSln.GetFilenameWithoutExtension().ToString();

if ( ! filename_sln.Contains("BuildAll") )
{
NuGetRestore(sampleSln, new NuGetRestoreSettings { }); // R8 errors
}
if
(
sampleSln.ToString().Contains("com.google.android.gms/play-services-location/LocationSample.sln")
||
sampleSln.ToString().Contains("com.google.android.gms/play-services-cast/CastingCall.sln")
||
sampleSln.ToString().Contains("com.google.android.gms/play-services-games/BeGenerous.sln")
||
sampleSln.ToString().Contains("com.google.android.gms/play-services-wallet/AndroidPayQuickstart.sln")
||
sampleSln.ToString().Contains("com.google.firebase/firebase-analytics/FirebaseAnalyticsQuickstart.sln")
||
sampleSln.ToString().Contains("com.google.firebase/firebase-storage/FirebaseStorageQuickstart.sln")
)
{
// skip problematic samples for now
continue;
}
Information($"Solution: {filename_sln}");
string bl = MakeAbsolute(new FilePath($"./output/{filename_sln}{config}.sample.binlog")).FullPath;
try
{
MSBuild
(
sampleSln,
c =>
{
c.Configuration = config;
c.Properties.Add("DesignTimeBuild", new [] { "false" });
c.BinaryLogger = new MSBuildBinaryLogSettings
{
Enabled = true,
FileName = bl
};
if (! string.IsNullOrEmpty(ANDROID_HOME))
{
c.Properties.Add("AndroidSdkDirectory", new [] { $"{ANDROID_HOME}" } );
}
}
);
}
catch (Exception exc)
{
Error($"Error: {exc}");
Error($" bl: {bl}");
Error($" bl: {bl.Replace($@"output", $@"output/failed")}");
if ( FileExists(bl) )
{
DeleteFile(bl);
}
MoveFile(bl, bl.Replace($@"output", $@"output/failed"));
}
}
}

DeleteFiles(".output/system.*/nupkg");
DeleteFiles(".output/microsoft.*/nupkg");
DeleteFiles(".output/xamarin.android.support.*/nupkg");
DeleteFiles(".output/xamarin.android.arch.*/nupkg");
DeleteFiles(".output/xamarin.build.download.*/nupkg");
});

Task("samples-dotnet")
.IsDependentOn("nuget")
.IsDependentOn("samples-only-dotnet")
Expand All @@ -936,7 +837,6 @@ Task("samples-only-dotnet")
{
"./samples/dotnet/BuildAllDotNet.sln",
"./samples/dotnet/BuildAllMauiApp.sln",
"./samples/dotnet/BuildAllXamarinForms.sln",
"./samples/dotnet/BuildAllPlayDotNet.sln",
};

Expand Down Expand Up @@ -1183,7 +1083,6 @@ Task ("ci-build")
;

Task ("ci-samples")
.IsDependentOn ("samples-only")
.IsDependentOn ("samples-only-dotnet")
;

Expand Down
1 change: 0 additions & 1 deletion published-namespaces.txt
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,6 @@ Square.Retrofit2.Converter.Gson
Square.Retrofit2.Converter.Scalars
Square.Retrofit2.Http
System.Runtime.CompilerServices
System.Runtime.Versioning
Volley
Volley.CroNet
Volley.Toolbox
Expand Down
2 changes: 1 addition & 1 deletion samples/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<!-- Default TFM's we build for -->
<PropertyGroup>
<_DefaultDotNetSampleTargetFrameworks>net6.0-android</_DefaultDotNetSampleTargetFrameworks>
<_DefaultDotNetSampleTargetFrameworks>net7.0-android</_DefaultDotNetSampleTargetFrameworks>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
Expand Down
7 changes: 7 additions & 0 deletions samples/dotnet/BuildAllMauiApp/BuildAllMauiApp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -83,5 +83,12 @@
>
<PackageReference Update="Xamarin.AndroidX.Security.SecurityCrypto" Version="[1.1.0.1-alpha06]" />
<PackageReference Update="Xamarin.AndroidX.Security.SecurityCrypto.Ktx" Version="[1.1.0.1-alpha06]" />

<!-- Should match version of the referenced 'Xamarin.AndroidX.Collection' package -->
<PackageReference Include="Xamarin.AndroidX.Collection.Jvm" Version="1.3.0.2" />
<PackageReference Include="Xamarin.AndroidX.Collection.Ktx" Version="1.3.0.2" />

<!-- Should match version of the referenced 'Xamarin.AndroidX.Activity' package -->
<PackageReference Include="Xamarin.AndroidX.Activity.Ktx" Version="1.8.1.1" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion source/GooglePlayServicesProject.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
var targetFrameworkMoniker = "MonoAndroid12.0";
}

<Project Sdk="Xamarin.Legacy.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>$(_DefaultTargetFrameworks)</TargetFrameworks>
<IsBindingProject>true</IsBindingProject>
Expand Down