diff --git a/Directory.Build.props b/Directory.Build.props
index ce8ff86c4..f8f7af7d3 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -4,5 +4,7 @@
git
$(BUILD_SOURCEBRANCH)
$(BUILD_SOURCEVERSION)
+ -net6preview03
+ $(PackageVersionSuffix).$(BUILD_BUILDID)
diff --git a/azure-pipelines.yml b/azure-pipelines.yml
index be93f4515..9a1c25dee 100644
--- a/azure-pipelines.yml
+++ b/azure-pipelines.yml
@@ -9,6 +9,14 @@ variables:
BUILD_NUMBER: $(Build.BuildNumber)
BUILD_COMMIT: $(Build.SourceVersion)
PRE_RESTORE_PROJECTS: true # Windows is having an issue on CI right now
+ DotNetCoreVersion: 3.1.x
+ DotNet6Version: 6.0.100-preview.3.21202.5
+ DotNet6AndroidMsi: https://dl.internalx.com/vsts-devdiv/Xamarin.Android/public/net6/4624420/6.0.1xx-preview3/7d6cd1cde4182d7db2cfc5d0b55364c972b6d34f/Microsoft.NET.Workload.Android.11.0.200.196.msi
+ DotNet6AndroidPkg: https://dl.internalx.com/vsts-devdiv/Xamarin.Android/public/net6/4624420/6.0.1xx-preview3/7d6cd1cde4182d7db2cfc5d0b55364c972b6d34f/Microsoft.NET.Workload.Android-11.0.200-preview.3.196.pkg
+ XamarinAndroidVsix: https://dl.internalx.com/vsts-devdiv/Xamarin.Android/public/4624420/6.0.1xx-preview3/7d6cd1cde4182d7db2cfc5d0b55364c972b6d34f/signed/Xamarin.Android.Sdk-11.2.99.196.vsix
+ XamarinAndroidPkg: https://dl.internalx.com/vsts-devdiv/Xamarin.Android/public/4624420/6.0.1xx-preview3/7d6cd1cde4182d7db2cfc5d0b55364c972b6d34f/xamarin.android-11.2.99.196.pkg
+ # TODO: remove before merging
+ NugetSecurityAnalysisWarningLevel: warn
# XAMARIN_ANDROID_PATH:
resources:
@@ -29,19 +37,46 @@ jobs:
timeoutInMinutes: 120
validPackagePrefixes: [ 'Xamarin' ]
areaPath: 'DevDiv\Xamarin SDK\Android'
+ dotnet: ''
+ initSteps:
+ - task: UseDotNet@2
+ displayName: install .NET $(DotNetCoreVersion)
+ inputs:
+ version: $(DotNetCoreVersion)
+ installationPath: /usr/local/share/dotnet/
+ condition: eq(variables['System.JobName'], 'macos')
+ - bash: >
+ export DOTNET_ROOT=/usr/local/share/dotnet/ &&
+ export PATH="$DOTNET_ROOT:~/.dotnet/tools:$PATH" &&
+ curl -L https://dot.net/v1/dotnet-install.sh > dotnet-install.sh &&
+ sh dotnet-install.sh --version $(DotNet6Version) --install-dir $DOTNET_ROOT --verbose &&
+ dotnet --list-sdks &&
+ echo "##vso[task.setvariable variable=PATH]$PATH"
+ displayName: install .NET $(DotNet6Version)
+ condition: eq(variables['System.JobName'], 'macos')
+ - pwsh: |
+ $ProgressPreference = 'SilentlyContinue'
+ Invoke-WebRequest -Uri "https://dot.net/v1/dotnet-install.ps1" -OutFile dotnet-install.ps1
+ & .\dotnet-install.ps1 -Version $(DotNet6Version) -InstallDir "$env:ProgramFiles\dotnet\" -Verbose
+ & dotnet --list-sdks
+ displayName: install .NET $(DotNet6Version)
+ condition: eq(variables['System.JobName'], 'windows')
preBuildSteps:
- pwsh: |
dotnet tool uninstall --global Cake.Tool
dotnet tool install --global Cake.Tool
dotnet tool install --global boots
- boots https://aka.ms/xamarin-android-commercial-d16-9-macos
+ displayName: install .NET global tools
+ - pwsh: |
+ boots $(DotNet6AndroidPkg)
+ boots $(XamarinAndroidPkg)
condition: eq(variables['System.JobName'], 'macos')
+ displayName: install Xamarin.Android
- pwsh: |
- dotnet tool uninstall --global Cake.Tool
- dotnet tool install --global Cake.Tool
- dotnet tool install --global boots
- boots https://aka.ms/xamarin-android-commercial-d16-9-windows
+ boots $(DotNet6AndroidMsi)
+ boots $(XamarinAndroidVsix)
condition: eq(variables['System.JobName'], 'windows')
+ displayName: install Xamarin.Android
tools:
- 'xamarin.androidbinderator.tool': '0.4.2'
- 'xamarin.androidx.migration.tool': '1.0.7.1'
diff --git a/build.cake b/build.cake
index 93331eceb..e35fae35b 100644
--- a/build.cake
+++ b/build.cake
@@ -604,12 +604,9 @@ Task("libs")
.IsDependentOn("libs-native")
.Does(() =>
{
- var settings = new MSBuildSettings()
+ var settings = new DotNetCoreMSBuildSettings()
.SetConfiguration(CONFIGURATION)
- .SetVerbosity(VERBOSITY)
.SetMaxCpuCount(0)
- .EnableBinaryLogger($"./output/libs.{CONFIGURATION}.binlog")
- .WithRestore()
.WithProperty("MigrationPackageVersion", MIGRATION_PACKAGE_VERSION)
.WithProperty("DesignTimeBuild", "false")
.WithProperty("AndroidSdkBuildToolsVersion", $"{AndroidSdkBuildTools}");
@@ -617,10 +614,11 @@ Task("libs")
if (!string.IsNullOrEmpty(ANDROID_HOME))
settings.WithProperty("AndroidSdkDirectory", $"{ANDROID_HOME}");
- if (!string.IsNullOrEmpty(MSBUILD_PATH))
- settings.ToolPath = MSBUILD_PATH;
-
- MSBuild("./generated/AndroidX.sln", settings);
+ DotNetCoreRestore("./generated/AndroidX.sln", new DotNetCoreRestoreSettings
+ {
+ MSBuildSettings = settings.EnableBinaryLogger("./output/restore.binlog")
+ });
+ DotNetCoreMSBuild("./generated/AndroidX.sln", settings.EnableBinaryLogger($"./output/libs.{CONFIGURATION}.binlog"));
});
Task("libs-native")
@@ -642,9 +640,8 @@ Task("nuget")
.IsDependentOn("libs")
.Does(() =>
{
- var settings = new MSBuildSettings()
+ var settings = new DotNetCoreMSBuildSettings()
.SetConfiguration(CONFIGURATION)
- .SetVerbosity(VERBOSITY)
.SetMaxCpuCount(0)
.EnableBinaryLogger($"./output/nuget.{CONFIGURATION}.binlog")
.WithProperty("MigrationPackageVersion", MIGRATION_PACKAGE_VERSION)
@@ -656,10 +653,7 @@ Task("nuget")
if (!string.IsNullOrEmpty(ANDROID_HOME))
settings.WithProperty("AndroidSdkDirectory", $"{ANDROID_HOME}");
- if (!string.IsNullOrEmpty(MSBUILD_PATH))
- settings.ToolPath = MSBUILD_PATH;
-
- MSBuild("./generated/AndroidX.sln", settings);
+ DotNetCoreMSBuild("./generated/AndroidX.sln", settings);
});
Task("samples-generate-all-targets")
@@ -931,7 +925,7 @@ Task("migration-libs")
.SetMaxCpuCount(0)
.EnableBinaryLogger($"./output/migration-libs.{CONFIGURATION}.binlog")
.WithRestore()
- .WithProperty("PackageVersion", MIGRATION_PACKAGE_VERSION);
+ .WithProperty("MigrationPackageVersion", MIGRATION_PACKAGE_VERSION);
if (!string.IsNullOrEmpty(ANDROID_HOME))
settings.WithProperty("AndroidSdkDirectory", $"{ANDROID_HOME}");
@@ -953,7 +947,7 @@ Task("migration-nuget")
.EnableBinaryLogger($"./output/migration-nuget.{CONFIGURATION}.binlog")
.WithProperty("NoBuild", "true")
.WithRestore()
- .WithProperty("PackageVersion", MIGRATION_PACKAGE_VERSION)
+ .WithProperty("MigrationPackageVersion", MIGRATION_PACKAGE_VERSION)
.WithProperty("MultiDexVersion", MULTIDEX_PACKAGE_VERSION)
.WithProperty("PackageRequireLicenseAcceptance", "true")
.WithProperty("PackageOutputPath", MakeAbsolute((DirectoryPath)"./output/").FullPath)
diff --git a/config.json b/config.json
index 431c3f403..77bc31e3e 100644
--- a/config.json
+++ b/config.json
@@ -901,7 +901,7 @@
"groupId": "com.google.guava",
"artifactId": "guava",
"version": "28.2.0",
- "nugetVersion": "28.2.0",
+ "nugetVersion": "28.2.0-net6preview02.4534767",
"nugetId": "Xamarin.Google.Guava",
"dependencyOnly": true
},
@@ -909,7 +909,7 @@
"groupId": "com.google.guava",
"artifactId": "failureaccess",
"version": "1.0.1",
- "nugetVersion": "1.0.1.2",
+ "nugetVersion": "1.0.1.2-net6preview02.4534767",
"nugetId": "Xamarin.Google.Guava.FailureAccess",
"dependencyOnly": true
},
@@ -917,7 +917,7 @@
"groupId": "com.google.guava",
"artifactId": "listenablefuture",
"version": "1.0",
- "nugetVersion": "1.0.0.2",
+ "nugetVersion": "1.0.0.2-net6preview02.4534767",
"nugetId": "Xamarin.Google.Guava.ListenableFuture",
"dependencyOnly": true
},
diff --git a/generated/global.json b/generated/global.json
new file mode 100644
index 000000000..dc08cc297
--- /dev/null
+++ b/generated/global.json
@@ -0,0 +1,11 @@
+{
+ "sdk": {
+ "version": "6.0.100-preview.3.21202.5",
+ "rollForward": "disable",
+ "allowPrerelease": true
+ },
+ "msbuild-sdks": {
+ "Microsoft.Build.Traversal": "2.1.1",
+ "Xamarin.Legacy.Sdk": "0.1.0-alpha2"
+ }
+}
\ No newline at end of file
diff --git a/global.json b/global.json
index 384986771..2bd6d9058 100644
--- a/global.json
+++ b/global.json
@@ -1,6 +1,7 @@
{
"msbuild-sdks":
{
- "Microsoft.Build.Traversal": "2.1.1"
+ "Microsoft.Build.Traversal": "2.1.1",
+ "Xamarin.Legacy.Sdk": "0.1.0-alpha2"
}
}
\ No newline at end of file
diff --git a/nuget.config b/nuget.config
new file mode 100644
index 000000000..166b7729f
--- /dev/null
+++ b/nuget.config
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/source/AndroidXProject.cshtml b/source/AndroidXProject.cshtml
index 9c2571411..1fbaf576c 100644
--- a/source/AndroidXProject.cshtml
+++ b/source/AndroidXProject.cshtml
@@ -1,24 +1,15 @@
@using System.Linq
-
+
- MonoAndroid9.0
+ MonoAndroid9.0;net6.0-android
true
@if (!string.IsNullOrEmpty(Model.AssemblyName)) {
@(Model.AssemblyName)
} else {
@(Model.NuGetPackageId)
}
- Resources
- Assets
- False
- True
- Resources\Resource.designer.cs
+ false
@(Model.NuGetPackageId.Replace("Xamarin.", ""))
- true
- true
- true
- d8
- r8
$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb
diff --git a/source/com.google.android.material/Xamarin.Google.Android.Material.Extensions/Xamarin.Google.Android.Material.Extensions.csproj b/source/com.google.android.material/Xamarin.Google.Android.Material.Extensions/Xamarin.Google.Android.Material.Extensions.csproj
index 5607afc4d..ac3ec1095 100644
--- a/source/com.google.android.material/Xamarin.Google.Android.Material.Extensions/Xamarin.Google.Android.Material.Extensions.csproj
+++ b/source/com.google.android.material/Xamarin.Google.Android.Material.Extensions/Xamarin.Google.Android.Material.Extensions.csproj
@@ -1,6 +1,6 @@
-
+
- MonoAndroid90
+ MonoAndroid90;net6.0-android
true
Xamarin.Google.Android.Material.Extensions
Resources
diff --git a/source/migration/BuildTasks/Xamarin.AndroidX.Migration.BuildTasks.csproj b/source/migration/BuildTasks/Xamarin.AndroidX.Migration.BuildTasks.csproj
index 8dc29e2d3..8d6e30883 100644
--- a/source/migration/BuildTasks/Xamarin.AndroidX.Migration.BuildTasks.csproj
+++ b/source/migration/BuildTasks/Xamarin.AndroidX.Migration.BuildTasks.csproj
@@ -4,6 +4,7 @@
netstandard2.0
latest
true
+ $(MigrationPackageVersion)$(PackageVersionSuffix)
diff --git a/source/migration/Tool/Xamarin.AndroidX.Migration.Tool.csproj b/source/migration/Tool/Xamarin.AndroidX.Migration.Tool.csproj
index 8fd61038a..fd3a481c5 100644
--- a/source/migration/Tool/Xamarin.AndroidX.Migration.Tool.csproj
+++ b/source/migration/Tool/Xamarin.AndroidX.Migration.Tool.csproj
@@ -13,6 +13,7 @@
Migration Tools for Xamarin AndroidX
1.0.0.0
1.0.0.0
+ $(MigrationPackageVersion)$(PackageVersionSuffix)
This package provides a set of tools and MSBuild tasks to aid in the migration from Android Support to Android X.
This package provides a set of tools and MSBuild tasks to aid in the migration from Android Support to Android X.
https://go.microsoft.com/fwlink/?linkid=2099353