Skip to content

[One .NET] Initial workload support #5195

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 23 commits into from
Oct 21, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
9effc6e
Initial workload drop
pjcollins Oct 7, 2020
3399ea5
Update test project SDK import
pjcollins Oct 9, 2020
523f64b
Remove Xamarin.Android.Sdk.Lite
pjcollins Oct 9, 2020
d2abf96
Install workloads in CI
pjcollins Oct 9, 2020
746b4cd
Update common properties and tests for new import ordering
pjcollins Oct 12, 2020
67656d5
Apply feedback and fix macOS executable extraction
pjcollins Oct 12, 2020
42f6946
Fix casing typo
pjcollins Oct 13, 2020
936d853
Move capabilities, remove $(TargetPlatformIdentifier) checks
pjcollins Oct 14, 2020
8324592
Rename .props files imported by Microsoft.Android.Sdk.targets
pjcollins Oct 14, 2020
c7fbffe
Separate out workload cleanup target
pjcollins Oct 14, 2020
6f1a0e4
Move $(TargetPlatformSupported) to Microsoft.Android.Sdk.SupportedPla…
pjcollins Oct 14, 2020
8ec2c0c
Ensure relevant darwin _and_ linux workload files are executable
pjcollins Oct 14, 2020
9e4e07e
Remove Microsoft.Android.Sdk.DefaultItems.props
jonathanpeppers Oct 16, 2020
decc96a
Move @(ProjectCapability) items to their own file
jonathanpeppers Oct 16, 2020
480006d
ExtractWorkloadPacks should <Touch/> all files
jonathanpeppers Oct 16, 2020
420928f
Merge remote-tracking branch 'upstream/master' into workload-playground
jonathanpeppers Oct 16, 2020
d26730b
Remove TODO in DotNetPack test
jonathanpeppers Oct 19, 2020
45e811b
Fix for using net5.0-android30.0 in NuGet packages
jonathanpeppers Oct 19, 2020
a504378
Temporary fix for _AndroidXShouldRunMigration=false
jonathanpeppers Oct 19, 2020
809ebf5
Rename workload to Microsoft.NET.Workload.Android
pjcollins Oct 20, 2020
052862a
Clean up old workload pack name
pjcollins Oct 20, 2020
545e524
Merge remote-tracking branch 'upstream/master' into workload-playground
pjcollins Oct 20, 2020
b2076e0
Fix version miscalculation that can occur in PR builds
pjcollins Oct 20, 2020
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
3 changes: 3 additions & 0 deletions Configuration.props
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@
<AndroidNdkDirectory Condition=" '$(AndroidNdkDirectory)' == '' ">$(AndroidToolchainDirectory)\ndk</AndroidNdkDirectory>
<DotNetPreviewPath Condition=" '$(DotNetPreviewPath)' == '' ">$(AndroidToolchainDirectory)\dotnet\</DotNetPreviewPath>
<DotNetPreviewTool Condition=" '$(DotNetPreviewTool)' == '' ">$(DotNetPreviewPath)dotnet</DotNetPreviewTool>
<!-- Version number from: https://github.com/dotnet/installer#installers-and-binaries -->
<DotNetPreviewVersionBand Condition=" '$(DotNetPreviewVersionBand)' == '' ">5.0.100</DotNetPreviewVersionBand>
<DotNetPreviewVersionFull Condition=" '$(DotNetPreviewVersionFull)' == '' ">$(DotNetPreviewVersionBand)-rtm.20509.5</DotNetPreviewVersionFull>
<AndroidCmakeVersion Condition=" '$(AndroidCmakeVersion)' == '' ">3.10.2</AndroidCmakeVersion>
<AndroidCmakeVersionPath Condition=" '$(AndroidCmakeVersionPath)' == '' ">$(AndroidCmakeVersion).4988404</AndroidCmakeVersionPath>
<AndroidSdkCmakeDirectory>$(AndroidSdkDirectory)\cmake\$(AndroidCmakeVersionPath)</AndroidSdkCmakeDirectory>
Expand Down
4 changes: 3 additions & 1 deletion Documentation/guides/OneDotNet.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,12 @@ not be supported:

## Default file inclusion

Default Android related file globbing behavior is defined in `Microsoft.Android.Sdk.DefaultItems.targets`.
Default Android related file globbing behavior is defined in [`AutoImport.props`][autoimport].
This behavior can be disabled for Android items by setting `$(EnableDefaultAndroidItems)` to `false`, or
all default item inclusion behavior can be disabled by setting `$(EnableDefaultItems)` to `false`.

[autoimport]: https://github.com/dotnet/designs/blob/4703666296f5e59964961464c25807c727282cae/accepted/2020/workloads/workload-resolvers.md#workload-props-files

## Linker (ILLink)

.NET 5 and higher has new [settings for the linker][linker]:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ public override bool Execute ()
writer.WriteStartElement ("Project");

writer.WriteStartElement ("PropertyGroup");
writer.WriteStartElement ("TargetPlatformSupported");
writer.WriteString ("true");
writer.WriteEndElement (); // </TargetPlatformSupported>
writer.WriteStartElement ("TargetPlatformVersion");
writer.WriteAttributeString ("Condition", " '$(TargetPlatformVersion)' == '' ");
writer.WriteString (versions.MaxStableVersion.ApiLevel.ToString ());
Expand All @@ -71,7 +74,6 @@ public override bool Execute ()
writer.WriteEndElement (); // </AndroidSdkSupportedTargetPlatformVersion>
}
writer.WriteStartElement ("SdkSupportedTargetPlatformVersion");
writer.WriteAttributeString ("Condition", " '$(TargetPlatformIdentifier)' == 'Android' ");
writer.WriteAttributeString ("Include", "@(AndroidSdkSupportedTargetPlatformVersion)");

writer.WriteEndDocument (); // </Project>
Expand Down
20 changes: 2 additions & 18 deletions build-tools/automation/azure-pipelines.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -320,12 +320,13 @@ stages:
configuration: $(XA.Build.Configuration)
msbuildArguments: /t:Prepare /p:AutoProvision=true /bl:$(System.DefaultWorkingDirectory)\bin\Build$(XA.Build.Configuration)\msbuild-prepare.binlog

# Build, pack .nupkgs, and extract workload packs to dotnet preview test directory
- task: MSBuild@1
displayName: msbuild Xamarin.Android
inputs:
solution: Xamarin.Android.sln
configuration: $(XA.Build.Configuration)
msbuildArguments: /bl:$(System.DefaultWorkingDirectory)\bin\Build$(XA.Build.Configuration)\msbuild-build.binlog
msbuildArguments: /t:PackDotNet /bl:$(System.DefaultWorkingDirectory)\bin\Build$(XA.Build.Configuration)\msbuild-build.binlog

- task: MSBuild@1
displayName: msbuild create-vsix
Expand All @@ -334,13 +335,6 @@ stages:
configuration: $(XA.Build.Configuration)
msbuildArguments: /p:CreateVsixContainer=True /p:ZipPackageCompressionLevel=Normal /bl:$(System.DefaultWorkingDirectory)\bin\Build$(XA.Build.Configuration)\msbuild-create-vsix.binlog

- task: MSBuild@1
displayName: pack all nupkgs
inputs:
solution: $(System.DefaultWorkingDirectory)\build-tools\create-packs\Microsoft.Android.Sdk.proj
configuration: $(XA.Build.Configuration)
msbuildArguments: /t:CreateAllPacks /restore /bl:$(System.DefaultWorkingDirectory)\bin\Build$(XA.Build.Configuration)\create-all-packs.binlog

- task: CmdLine@1
displayName: xabuild Xamarin.Android-Tests
inputs:
Expand Down Expand Up @@ -695,11 +689,6 @@ stages:
artifactName: $(TestAssembliesArtifactName)
downloadPath: $(System.DefaultWorkingDirectory)/bin/Test$(XA.Build.Configuration)

- task: DownloadPipelineArtifact@2
inputs:
artifactName: $(NuGetArtifactName)
downloadPath: $(System.DefaultWorkingDirectory)/bin/Build$(XA.Build.Configuration)/$(NuGetArtifactName)

- task: MSBuild@1
displayName: start emulator
inputs:
Expand Down Expand Up @@ -860,11 +849,6 @@ stages:
artifactName: $(TestAssembliesArtifactName)
downloadPath: $(System.DefaultWorkingDirectory)/bin/Test$(XA.Build.Configuration)

- task: DownloadPipelineArtifact@2
inputs:
artifactName: $(NuGetArtifactName)
downloadPath: $(System.DefaultWorkingDirectory)/bin/Build$(XA.Build.Configuration)/$(NuGetArtifactName)

- task: MSBuild@1
displayName: start emulator
inputs:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,6 @@ jobs:
artifactName: $(TestAssembliesArtifactName)
downloadPath: $(System.DefaultWorkingDirectory)/bin/Test$(XA.Build.Configuration)

- task: DownloadPipelineArtifact@1
inputs:
artifactName: $(NuGetArtifactName)
downloadPath: $(System.DefaultWorkingDirectory)/bin/Build$(XA.Build.Configuration)/$(NuGetArtifactName)

- template: run-nunit-tests.yaml
parameters:
useDotNet: $(UseDotNet)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,6 @@ jobs:
artifactName: $(TestAssembliesArtifactName)
downloadPath: $(System.DefaultWorkingDirectory)\bin\Test$(XA.Build.Configuration)

- task: DownloadPipelineArtifact@1
inputs:
artifactName: $(NuGetArtifactName)
downloadPath: $(System.DefaultWorkingDirectory)\bin\Build$(XA.Build.Configuration)\$(NuGetArtifactName)

# Limit the amount of worker threads used to run these tests in parallel to half of what is currently available (8) on the Windows pool.
# Using all available cores seems to occasionally bog down our machines and cause parallel test execution to slow down dramatically.
- template: run-nunit-tests.yaml
Expand Down
13 changes: 13 additions & 0 deletions build-tools/automation/yaml-templates/setup-test-environment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,16 @@ steps:
solution: ${{ parameters.xaSourcePath }}/build-tools/xamarin.Android.Tools.BootstrapTasks/Xamarin.Android.Tools.BootstrapTasks.csproj
configuration: ${{ parameters.configuration }}
msbuildArguments: /restore /bl:${{ parameters.xaSourcePath }}/bin/Test${{ parameters.configuration }}/BootstrapTasks.binlog

# Download and install .NET nupkgs
- task: DownloadPipelineArtifact@2
inputs:
artifactName: $(NuGetArtifactName)
downloadPath: ${{ parameters.xaSourcePath }}/bin/Build${{ parameters.configuration }}/$(NuGetArtifactName)

- task: MSBuild@1
displayName: extract workload packs
inputs:
solution: ${{ parameters.xaSourcePath }}/build-tools/create-packs/Microsoft.Android.Sdk.proj
configuration: ${{ parameters.configuration }}
msbuildArguments: /t:ExtractWorkloadPacks /restore /bl:${{ parameters.xaSourcePath }}/bin/Test${{ parameters.configuration }}/extract-workloads.binlog
61 changes: 55 additions & 6 deletions build-tools/create-packs/Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
<Import Project="Sdk.props" Sdk="Microsoft.DotNet.Build.Tasks.SharedFramework.Sdk" />
<UsingTask TaskName="CreateFrameworkListFile" AssemblyFile="$(DotNetBuildTasksSharedFrameworkTaskFile)"/>

<PropertyGroup>
<_WorkloadResolverFlagFile>$(DotNetPreviewPath)sdk\$(DotNetPreviewVersionFull)\EnableWorkloadResolver.sentinel</_WorkloadResolverFlagFile>
</PropertyGroup>

<ItemGroup>
<!-- NOTE: we don't have a reference assembly for Java.Interop.dll yet -->
<_AndroidAppRefAssemblies Include="$(XamarinAndroidSourcePath)bin\$(Configuration)\lib\xamarin.android\xbuild-frameworks\Microsoft.Android\netcoreapp3.1\Java.Interop.dll" />
Expand Down Expand Up @@ -51,18 +55,63 @@
</PropertyGroup>
</Target>

<Target Name="CreateAllRuntimePacks" >
<Target Name="CreateAllPacks"
DependsOnTargets="DeleteExtractedWorkloadPacks" >
<RemoveDir Directories="$(XamarinAndroidSourcePath)bin\Build$(Configuration)\nupkgs" />
<Exec Command="$(DotNetPreviewTool) pack -p:Configuration=$(Configuration) -p:AndroidRID=android.21-arm -p:AndroidABI=armeabi-v7a &quot;$(MSBuildThisFileDirectory)Microsoft.Android.Runtime.proj&quot;" />
<Exec Command="$(DotNetPreviewTool) pack -p:Configuration=$(Configuration) -p:AndroidRID=android.21-arm64 -p:AndroidABI=arm64-v8a &quot;$(MSBuildThisFileDirectory)Microsoft.Android.Runtime.proj&quot;" />
<Exec Command="$(DotNetPreviewTool) pack -p:Configuration=$(Configuration) -p:AndroidRID=android.21-x86 -p:AndroidABI=x86 &quot;$(MSBuildThisFileDirectory)Microsoft.Android.Runtime.proj&quot;" />
<Exec Command="$(DotNetPreviewTool) pack -p:Configuration=$(Configuration) -p:AndroidRID=android.21-x64 -p:AndroidABI=x86_64 &quot;$(MSBuildThisFileDirectory)Microsoft.Android.Runtime.proj&quot;" />
</Target>

<Target Name="CreateAllPacks"
DependsOnTargets="CreateAllRuntimePacks" >
<Exec Command="$(DotNetPreviewTool) pack -p:Configuration=$(Configuration) &quot;$(MSBuildThisFileDirectory)Microsoft.Android.Ref.proj&quot;" />
<Exec Command="$(DotNetPreviewTool) pack -p:Configuration=$(Configuration) &quot;$(MSBuildThisFileDirectory)Microsoft.Android.Sdk.proj&quot;" />
<Exec Command="$(DotNetPreviewTool) pack -p:Configuration=$(Configuration) &quot;$(MSBuildThisFileDirectory)Xamarin.Android.Sdk.Lite.proj&quot;" />
<Exec Command="$(DotNetPreviewTool) pack -p:Configuration=$(Configuration) &quot;$(MSBuildThisFileDirectory)Microsoft.NET.Workload.Android.proj&quot;" />
</Target>

<Target Name="ExtractWorkloadPacks"
DependsOnTargets="DeleteExtractedWorkloadPacks" >
<ItemGroup>
<_WLManifest Include="$(XamarinAndroidSourcePath)bin\Build$(Configuration)\nupkgs\Microsoft.NET.Workload.Android.*.nupkg" />
<_WLPacks Include="$(XamarinAndroidSourcePath)bin\Build$(Configuration)\nupkgs\Microsoft.Android.Sdk.*.nupkg" />
<_WLPacks Include="$(XamarinAndroidSourcePath)bin\Build$(Configuration)\nupkgs\Microsoft.Android.Ref.*.nupkg" />
<!-- Runtime packs are not yet supported by workloads -->
<!-- <_WLPacks Include="$(XamarinAndroidSourcePath)bin\Build$(Configuration)\nupkgs\Microsoft.Android.Runtime.*.nupkg" /> -->
</ItemGroup>
<PropertyGroup>
<_WLPackVersion>@(_WLManifest->'%(Filename)'->Replace('Microsoft.NET.Workload.Android.', ''))</_WLPackVersion>
</PropertyGroup>
<Unzip
SourceFiles="@(_WLManifest)"
DestinationFolder="$(DotNetPreviewPath)sdk-manifests\$(DotNetPreviewVersionBand)\Microsoft.NET.Workload.Android"
/>
<Unzip
SourceFiles="@(_WLPacks)"
DestinationFolder="$(DotNetPreviewPath)packs\$([System.String]::Copy('%(_WLPacks.Filename)').Replace('.$(_WLPackVersion)', ''))\$(_WLPackVersion)"
/>
<ItemGroup>
<_UnixExecutables Include="$(DotNetPreviewPath)packs\Microsoft.Android.Sdk\*\tools\$(HostOS)\**\*.*" />
<_FilesToTouch Include="$(DotNetPreviewPath)sdk-manifests\$(DotNetPreviewVersionBand)\Microsoft.NET.Workload.Android\**" />
<_FilesToTouch Include="$(DotNetPreviewPath)packs\$([System.String]::Copy('%(_WLPacks.Filename)').Replace('.$(_WLPackVersion)', ''))\$(_WLPackVersion)\**" />
</ItemGroup>
<Exec
Condition=" '$(HostOS)' == 'Darwin' or '$(HostOS)' == 'Linux' "
Command="chmod +x &quot;%(_UnixExecutables.Identity)&quot;"
/>
<!-- Some files had timestamps in the future -->
<Touch Files="@(_FilesToTouch)" />
<Touch
Files="$(_WorkloadResolverFlagFile)"
AlwaysCreate="true"
/>
</Target>

<Target Name="DeleteExtractedWorkloadPacks" >
<ItemGroup>
<_PackFilesToDelete Include="$(DotNetPreviewPath)sdk-manifests\$(DotNetPreviewVersionBand)\Microsoft.Android.Workload\**\*.*" />
<_PackFilesToDelete Include="$(DotNetPreviewPath)sdk-manifests\$(DotNetPreviewVersionBand)\Microsoft.NET.Workload.Android\**\*.*" />
<_PackFilesToDelete Include="$(DotNetPreviewPath)packs\Microsoft.Android*\**\*.*" />
</ItemGroup>
<RemoveDir Directories="%(_PackFilesToDelete.RootDir)%(_PackFilesToDelete.Directory)" />
<Delete Files="$(_WorkloadResolverFlagFile)" />
</Target>

</Project>
22 changes: 10 additions & 12 deletions build-tools/create-packs/Microsoft.Android.Sdk.proj
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
***********************************************************************************************
Microsoft.Android.Sdk.proj

This project file is used to create the Microsoft.Android.Sdk NuGet, which will serve as
the new entry point for short-form style Android projets in .NET 5.
This project file is used to create the Microsoft.Android.Sdk NuGet, which is the core workload
sdk pack imported by Microsoft.NET.Workload.Android.
***********************************************************************************************
-->
<Project Sdk="Microsoft.Build.NoTargets">
Expand All @@ -19,7 +19,7 @@ the new entry point for short-form style Android projets in .NET 5.
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Mono.Posix.NETStandard" Version="5.20.1-preview" GeneratePathProperty="true" />
<PackageReference Include="Mono.Posix.NETStandard" Version="5.20.1-preview" GeneratePathProperty="true" PrivateAssets="all" />
</ItemGroup>

<Import Project="..\..\Configuration.props" />
Expand Down Expand Up @@ -77,9 +77,7 @@ the new entry point for short-form style Android projets in .NET 5.
<_PackageFiles Include="$(XAInstallPrefix)xbuild-frameworks\Microsoft.Android\Version*" PackagePath="tools" />
<_PackageFiles Include="$(XamarinAndroidSourcePath)src\Xamarin.Android.Build.Tasks\Microsoft.Android.Sdk\Sdk\**" PackagePath="Sdk" />
<_PackageFiles Include="$(XamarinAndroidSourcePath)src\Microsoft.Android.Sdk.ILLink\PreserveLists\**" PackagePath="PreserveLists" />
<_PackageFiles Include="$(XamarinAndroidSourcePath)src\Xamarin.Android.Build.Tasks\Microsoft.Android.Sdk\targets\**"
Exclude="$(XamarinAndroidSourcePath)src\Xamarin.Android.Build.Tasks\Microsoft.Android.Sdk\**\*.Lite.*"
PackagePath="targets" />
<_PackageFiles Include="$(XamarinAndroidSourcePath)src\Xamarin.Android.Build.Tasks\Microsoft.Android.Sdk\targets\**" PackagePath="targets" />
</ItemGroup>
</Target>

Expand All @@ -90,19 +88,19 @@ the new entry point for short-form style Android projets in .NET 5.
DependsOnTargets="_GetDefaultPackageVersion" >
<PropertyGroup>
<_AndroidNETAppTargetFramework>net5.0</_AndroidNETAppTargetFramework>
<BundledVersionsPropsFileName>Microsoft.Android.Sdk.BundledVersions.props</BundledVersionsPropsFileName>
<BundledVersionsFileName>Microsoft.Android.Sdk.BundledVersions.targets</BundledVersionsFileName>
</PropertyGroup>

<ItemGroup>
<_AndroidNETAppRuntimePackRids Include="android.21-arm;android.21-arm64;android.21-x86;android.21-x64" />
</ItemGroup>

<PropertyGroup>
<BundledVersionsPropsContent>
<BundledVersionsContent>
<![CDATA[
<!--
***********************************************************************************************
$(BundledVersionsPropsFileName)
$(BundledVersionsFileName)
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
created a backup copy. Incorrect changes to this file will make it
impossible to load or build your projects from the command-line or the IDE.
Expand Down Expand Up @@ -130,11 +128,11 @@ WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and
</ItemGroup>
</Project>
]]>
</BundledVersionsPropsContent>
</BundledVersionsContent>
</PropertyGroup>

<WriteLinesToFile File="$(XamarinAndroidSourcePath)src\Xamarin.Android.Build.Tasks\Microsoft.Android.Sdk\targets\$(BundledVersionsPropsFileName)"
Lines="$(BundledVersionsPropsContent)"
<WriteLinesToFile File="$(XamarinAndroidSourcePath)src\Xamarin.Android.Build.Tasks\Microsoft.Android.Sdk\targets\$(BundledVersionsFileName)"
Lines="$(BundledVersionsContent)"
Overwrite="true" />
</Target>

Expand Down
86 changes: 86 additions & 0 deletions build-tools/create-packs/Microsoft.NET.Workload.Android.proj
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
<!--
***********************************************************************************************
Microsoft.NET.Workload.Android.proj

This project file is used to create the Microsoft.NET.Workload.Android NuGet, which is the
workload manifest pack containing information about the various Microsoft.Android workloads.
***********************************************************************************************
-->
<Project Sdk="Microsoft.Build.NoTargets">

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<PackageId>Microsoft.NET.Workload.Android</PackageId>
<Authors>Microsoft</Authors>
<Description>Microsoft.Android workload manifest. Please do not reference directly.</Description>
<OutputPath>..\..\bin\Build$(Configuration)\nupkgs\</OutputPath>
</PropertyGroup>

<Import Project="..\..\Configuration.props" />
<Import Project="..\..\build-tools\installers\create-installers.targets" />

<PropertyGroup>
<BeforePack>
_GenerateXAWorkloadContent;
$(BeforePack);
</BeforePack>
</PropertyGroup>

<!-- FIXME: Temporarily Generate WorkloadManifest.targets and WorkloadManifest.json files inline while content is trivial. -->
<Target Name="_GenerateXAWorkloadContent"
DependsOnTargets="_GetDefaultPackageVersion" >
<PropertyGroup>
<WorkloadManifestTargetsPath>$(OutputPath)\workload-manifest\WorkloadManifest.targets</WorkloadManifestTargetsPath>
<WorkloadManifestJsonPath>$(OutputPath)\workload-manifest\WorkloadManifest.json</WorkloadManifestJsonPath>
<WorkloadManifestTargetsContent>
<![CDATA[
<Project>
<Import Project="Sdk.targets"
Sdk="Microsoft.Android.Sdk"
Condition=" '%24(TargetPlatformIdentifier)' == 'Android' " />
</Project>
]]>
</WorkloadManifestTargetsContent>
<WorkloadManifestJsonContent>
<![CDATA[
{
"version": 5,
"workloads": {
"microsoft-android-sdk-full": {
"description": "Android SDK",
"packs": [
"Microsoft.Android.Sdk",
"Microsoft.Android.Ref",
]
}
},
"packs": {
"Microsoft.Android.Sdk": {
"kind": "sdk",
"version": "$(AndroidPackVersionLong)"
},
"Microsoft.Android.Ref": {
"kind": "framework",
"version": "$(AndroidPackVersionLong)"
}
}
}
]]>
</WorkloadManifestJsonContent>
</PropertyGroup>

<WriteLinesToFile File="$(WorkloadManifestTargetsPath)"
Lines="$(WorkloadManifestTargetsContent)"
Overwrite="true" />

<WriteLinesToFile File="$(WorkloadManifestJsonPath)"
Lines="$(WorkloadManifestJsonContent)"
Overwrite="true" />

<ItemGroup>
<_PackageFiles Include="$(WorkloadManifestTargetsPath)" PackagePath="\" />
<_PackageFiles Include="$(WorkloadManifestJsonPath)" PackagePath="\" />
</ItemGroup>
</Target>

</Project>
Loading