|
| 1 | +<Project Sdk="Microsoft.NET.Sdk"> |
| 2 | + |
| 3 | + <PropertyGroup> |
| 4 | + <TargetFramework>$(DotNetTargetFramework)</TargetFramework> |
| 5 | + <LangVersion>latest</LangVersion> |
| 6 | + <Nullable>enable</Nullable> |
| 7 | + <IsPackable>false</IsPackable> |
| 8 | + <RootNamespace>Microsoft.Android.Sdk.TrimmableTypeMap.IntegrationTests</RootNamespace> |
| 9 | + <SignAssembly>true</SignAssembly> |
| 10 | + <AssemblyOriginatorKeyFile>..\..\product.snk</AssemblyOriginatorKeyFile> |
| 11 | + <OutputPath>..\..\bin\Test$(Configuration)</OutputPath> |
| 12 | + </PropertyGroup> |
| 13 | + |
| 14 | + <ItemGroup> |
| 15 | + <PackageReference Include="xunit" Version="2.9.3" /> |
| 16 | + <PackageReference Include="xunit.runner.visualstudio" Version="3.0.2" /> |
| 17 | + <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0" /> |
| 18 | + </ItemGroup> |
| 19 | + |
| 20 | + <!-- Exclude the fixture assembly source files from this project --> |
| 21 | + <ItemGroup> |
| 22 | + <Compile Remove="UserTypesFixture\**" /> |
| 23 | + </ItemGroup> |
| 24 | + |
| 25 | + <ItemGroup> |
| 26 | + <ProjectReference Include="..\..\src\Microsoft.Android.Sdk.TrimmableTypeMap\Microsoft.Android.Sdk.TrimmableTypeMap.csproj" /> |
| 27 | + <ProjectReference Include="..\..\src\Xamarin.Android.Build.Tasks\Xamarin.Android.Build.Tasks.csproj" /> |
| 28 | + <!-- Mono.Android is built as a dependency so the ref assembly is available on disk. |
| 29 | + ReferenceOutputAssembly=false because we read it with SRM/Cecil, not compile against it directly. |
| 30 | + Instead, we reference the ref assembly below so we can use typeof(Java.Lang.Object). --> |
| 31 | + <ProjectReference Include="..\..\src\Mono.Android\Mono.Android.csproj" |
| 32 | + ReferenceOutputAssembly="false" /> |
| 33 | + <!-- User-type fixture assembly: built as a dependency, scanned via SRM/Cecil in tests. |
| 34 | + ReferenceOutputAssembly=false because we don't compile against it — we just need the DLL on disk. --> |
| 35 | + <ProjectReference Include="UserTypesFixture\UserTypesFixture.csproj" |
| 36 | + ReferenceOutputAssembly="false" /> |
| 37 | + </ItemGroup> |
| 38 | + |
| 39 | + <!-- Discover the Mono.Android ref assembly path and add a direct Reference to it. |
| 40 | + This lets tests use typeof(Java.Lang.Object).Assembly.Location to find the assembly. --> |
| 41 | + <Target Name="_AddMonoAndroidReference" BeforeTargets="ResolveAssemblyReferences"> |
| 42 | + <ItemGroup> |
| 43 | + <_MonoAndroidRefCandidate Include="$(MSBuildThisFileDirectory)..\..\bin\$(Configuration)\lib\packs\Microsoft.Android.Ref.*\*\ref\net*\Mono.Android.dll" /> |
| 44 | + </ItemGroup> |
| 45 | + <PropertyGroup> |
| 46 | + <_MonoAndroidRefAssembly>@(_MonoAndroidRefCandidate, ';')</_MonoAndroidRefAssembly> |
| 47 | + <_MonoAndroidRefAssembly>$(_MonoAndroidRefAssembly.Split(';')[0])</_MonoAndroidRefAssembly> |
| 48 | + </PropertyGroup> |
| 49 | + <ItemGroup Condition=" '$(_MonoAndroidRefAssembly)' != '' "> |
| 50 | + <Reference Include="Mono.Android"> |
| 51 | + <HintPath>$(_MonoAndroidRefAssembly)</HintPath> |
| 52 | + </Reference> |
| 53 | + </ItemGroup> |
| 54 | + </Target> |
| 55 | + |
| 56 | +</Project> |
0 commit comments