Skip to content

Commit cec89fd

Browse files
mdh1418Mitchell Hwang
andauthored
[Android] Add AndroidAppBuilder pkgproj for Android sample (#43216)
In preparation to bring mono samples to `dotnet/samples`, files that are most likely to change will be packaged into a nuget package to be downloaded and consumed on the `dotnet/samples` end rather than mirroring changes. This PR expands the process that created the NuGet package for `Microsoft.NETCore.BrowserDebugHost.Transport` to build a NuGet package for the Android sample. Co-authored-by: Mitchell Hwang <mitchell.hwang@microsoft.com>
1 parent 806641c commit cec89fd

File tree

4 files changed

+28
-0
lines changed

4 files changed

+28
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.props))" />
4+
5+
<ItemGroup>
6+
<ProjectReference Include="$(RepoToolsLocalDir)tasks\mobile.tasks\AndroidAppBuilder\AndroidAppBuilder.csproj" />
7+
</ItemGroup>
8+
9+
<ItemGroup>
10+
<_AndroidSampleFiles Include="$(ArtifactsDir)bin\AndroidAppBuilder\$(Configuration)\$(NetCoreAppCurrent)\AndroidAppBuilder.dll" />
11+
12+
<PackageFile Include="@(_AndroidSampleFiles)" TargetPath="tools\$(NetCoreAppCurrent)\" />
13+
</ItemGroup>
14+
15+
<Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.targets))" />
16+
</Project>

src/mono/netcore/nuget/descriptions.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@
44
"Description": "When using NuGet 3.x this package requires at least version {0}.",
55
"CommonTypes": [ ]
66
},
7+
{
8+
"Name": "Microsoft.NET.Runtime.Android.Sample.Mono",
9+
"Description": "Internal package for sharing Android App Builder.",
10+
"CommonTypes": [ ]
11+
},
712
{
813
"Name": "Microsoft.NETCore.BrowserDebugHost.Transport",
914
"Description": "Internal package for sharing BrowserDebugHost.",

src/mono/netcore/nuget/mono-packages.proj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
<Project>
22
<Import Sdk="Microsoft.Build.Traversal" Project="Sdk.props" />
33

4+
<ItemGroup Condition="'$(TargetOS)' == 'Android'">
5+
<ProjectReference Include="Microsoft.NET.Runtime.Android.Sample.Mono\Microsoft.NET.Runtime.Android.Sample.Mono.pkgproj" />
6+
</ItemGroup>
7+
48
<ItemGroup Condition="'$(TargetOS)' == 'Browser'">
59
<ProjectReference Include="Microsoft.NETCore.BrowserDebugHost.Transport\Microsoft.NETCore.BrowserDebugHost.Transport.pkgproj" />
610
</ItemGroup>

tools-local/tasks/mobile.tasks/AndroidAppBuilder/AndroidAppBuilder.csproj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,7 @@
2525
<Target Name="PublishBuilder"
2626
AfterTargets="Build"
2727
DependsOnTargets="Publish" />
28+
29+
<Target Name="GetFilesToPackage" />
30+
2831
</Project>

0 commit comments

Comments
 (0)