|
| 1 | +<!-- |
| 2 | +*********************************************************************************************** |
| 3 | +Microsoft.Android.Runtime.Managed.proj |
| 4 | +
|
| 5 | +This project file is used to create Microsoft.Android.Runtime.[API].android NuGets, which are |
| 6 | +runtime packs that contain RID agnostic assets required for a self-contained publish of |
| 7 | +projects that use the Microsoft.Android framework in .NET 6+. |
| 8 | +*********************************************************************************************** |
| 9 | +--> |
| 10 | +<Project Sdk="Microsoft.Build.NoTargets"> |
| 11 | + |
| 12 | + <Sdk Name="Microsoft.DotNet.SharedFramework.Sdk" Version="$(MicrosoftDotNetBuildTasksFeedPackageVersion)" /> |
| 13 | + |
| 14 | + <PropertyGroup> |
| 15 | + <TargetFramework>netstandard2.0</TargetFramework> |
| 16 | + <AndroidRID>android</AndroidRID> |
| 17 | + <RuntimeIdentifier>$(AndroidRID)</RuntimeIdentifier> |
| 18 | + <PackageId>Microsoft.Android.Runtime.$(AndroidApiLevel).$(AndroidRID)</PackageId> |
| 19 | + <OverridePackageId>$(PackageId)</OverridePackageId> |
| 20 | + <PlatformPackageType>RuntimePack</PlatformPackageType> |
| 21 | + <Description>Microsoft.Android managed runtime components for API $(AndroidApiLevel). Please do not reference directly.</Description> |
| 22 | + <_AndroidRuntimePackAssemblyPath>runtimes/$(AndroidRID)/lib/$(DotNetTargetFramework)</_AndroidRuntimePackAssemblyPath> |
| 23 | + <_AndroidRuntimePackNativePath>runtimes/$(AndroidRID)/native</_AndroidRuntimePackNativePath> |
| 24 | + </PropertyGroup> |
| 25 | + |
| 26 | + <PropertyGroup> |
| 27 | + <BeforePack> |
| 28 | + _GetDefaultPackageVersion; |
| 29 | + $(BeforePack); |
| 30 | + </BeforePack> |
| 31 | + </PropertyGroup> |
| 32 | + |
| 33 | + <!-- Reset the TargetFramework after ProcessFrameworkReferences runs to avoid issues resolving non-existant linux-bionic runtime packs --> |
| 34 | + <Target Name="_RemoveLinuxFrameworkReferences" |
| 35 | + AfterTargets="ProcessFrameworkReferences"> |
| 36 | + <PropertyGroup> |
| 37 | + <TargetFramework>$(DotNetTargetFramework)</TargetFramework> |
| 38 | + </PropertyGroup> |
| 39 | + </Target> |
| 40 | + |
| 41 | + <Target Name="_GetRuntimePackItems" |
| 42 | + DependsOnTargets="_GetLicense;_GetDefaultPackageVersion" |
| 43 | + BeforeTargets="GetFilesToPackage" > |
| 44 | + <ItemGroup> |
| 45 | + <_AndroidRuntimePackAssemblies Include="$(_MonoAndroidNETDefaultOutDir)Java.Interop.dll" /> |
| 46 | + <_AndroidRuntimePackAssemblies Include="$(_MonoAndroidNETDefaultOutDir)Mono.Android.dll" /> |
| 47 | + <_AndroidRuntimePackAssemblies Include="$(_MonoAndroidNETDefaultOutDir)Mono.Android.Runtime.dll" /> |
| 48 | + <!-- Always include stable versions of the following assemblies --> |
| 49 | + <_AndroidRuntimePackAssemblies Include="$(_MonoAndroidNETOutputRoot)$(AndroidLatestStableApiLevel)\Mono.Android.Export.dll" /> |
| 50 | + <_AndroidRuntimePackAssemblies |
| 51 | + Include="$(_MonoAndroidNETOutputRoot)$(AndroidLatestStableApiLevel)\System.IO.Hashing.dll" |
| 52 | + NoSymbols="true" |
| 53 | + /> |
| 54 | + </ItemGroup> |
| 55 | + |
| 56 | + <ItemGroup> |
| 57 | + <FrameworkListFileClass Include="@(_AndroidRuntimePackAssemblies->'%(Filename)%(Extension)')" Profile="Android" /> |
| 58 | + <FilesToPackage Include="@(_AndroidRuntimePackAssemblies)" /> |
| 59 | + <FilesToPackage Include="@(_AndroidRuntimePackAssemblies->'%(RelativeDir)%(Filename).pdb')" IsSymbolFile="true" Condition=" '%(_AndroidRuntimePackAssemblies.NoSymbols)' != 'true' " /> |
| 60 | + </ItemGroup> |
| 61 | + </Target> |
| 62 | + |
| 63 | +</Project> |
0 commit comments