nunit.xamarin/NUnit.proj

141 строка
5.5 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" InitialTargets="" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- Region Define Properties -->
<PropertyGroup Label="Common Properties">
<ProjectName>nunit-xamarin</ProjectName>
<PackageVersion>3.0.0</PackageVersion>
<PackageModifier>-beta-4</PackageModifier>
<DisplayVersion>3.0 Beta 4</DisplayVersion>
</PropertyGroup>
<PropertyGroup Label="Project Directories">
<ProjectBaseDir>$(MSBuildProjectDirectory)</ProjectBaseDir>
<ProjectBuildDir>$(ProjectBaseDir)\bin</ProjectBuildDir>
<ProjectSrcDir>$(ProjectBaseDir)\src</ProjectSrcDir>
<ProjectToolsDir>$(ProjectBaseDir)\tools</ProjectToolsDir>
<NuspecDirectory>$(ProjectBaseDir)\nuget</NuspecDirectory>
</PropertyGroup>
<PropertyGroup Label="Default Build Settings">
<Configuration Condition="'$(Configuration)' == ''">Debug</Configuration>
<ConfigSuffix Condition=" '$(Configuration)' == 'Debug' ">-dbg</ConfigSuffix>
</PropertyGroup>
<PropertyGroup Label="Subdirectories">
<ConfigurationBuildDir>$(ProjectBuildDir)\$(Configuration)</ConfigurationBuildDir>
</PropertyGroup>
<PropertyGroup Label="Properties for building NuGet packages">
<NugetExecutable>$(ProjectToolsDir)\nuget.exe</NugetExecutable>
<NugetVersion>$(PackageVersion)$(PackageModifier)$(ConfigSuffix)</NugetVersion>
</PropertyGroup>
<PropertyGroup>
<MSBuildCommunityTasksPath>$(ProjectToolsDir)\msbuild</MSBuildCommunityTasksPath>
</PropertyGroup>
<Import Project="$(ProjectToolsDir)\msbuild\MSBuild.Community.Tasks.Targets" />
<!-- End Region -->
<!-- Region Dump Settings Target -->
<Target Name="DumpSettings">
<Message Text=" " />
<Message Text="Project Directories:" />
<Message Text=" Base: $(ProjectBaseDir)" />
<Message Text=" Build: $(ProjectBuildDir)" />
<Message Text=" Package: $(ProjectPackageDir)" />
<Message Text=" Source: $(ProjectSrcDir)" />
<Message Text=" Tools: $(ProjectToolsDir)" />
<Message Text=" NuSpecs: $(NuspecDirectory)" />
<Message Text=" " />
<Message Text="Build Settings:" />
<Message Text=" Configuration: $(Configuration)" />
<Message Text=" " />
<Message Text="NuGet" />
<Message Text=" Exe: $(NugetExecutable)" />
<Message Text=" Version: $(NugetVersion)" />
<Message Text=" " />
</Target>
<!-- End Region -->
<!-- Region Clean Targets -->
<Target Name="Clean" DependsOnTargets="CleanRunner" />
<Target Name="CleanAll" DependsOnTargets="CleanRunner">
<Exec Command="$(RemoveDir) $(ConfigurationBuildDir)" Condition="Exists('$(ConfigurationBuildDir)')" />
</Target>
<Target Name="CleanRunner" Label="Clean all Xamarin runner projects">
<MSBuild Targets="Clean" Projects="@(RunnerProjects)" Properties="Configuration=$(Configuration); Platform=AnyCPU" />
</Target>
<!-- End Region -->
<!-- Region Build Targets -->
<Target Name="Build" Label="Build the Xamarin runner projects" DependsOnTargets="BuildRunner" />
<Target Name="BuildAll" Label="Build the Xamarin runner projects and the platform specific test projects"
DependsOnTargets="BuildRunner,BuildAndroid,BuildIos" />
<Target Name="BuildRunner" Label="Build the Xamarin runner projects">
<MSBuild Targets="Build" Projects="@(RunnerProjects)" Properties="Configuration=$(Configuration); Platform=AnyCPU" />
</Target>
<Target Name="BuildAndroid" Label="Build the Android test project">
<MSBuild Targets="Build" Projects="@(AndroidProjects)" Properties="Configuration=$(Configuration); Platform=AnyCPU" />
</Target>
<Target Name="BuildIos" Label="Build the iPhone test project">
<MSBuild Targets="Build" Projects="@(IosProjects)" Properties="Configuration=$(Configuration); Platform=iPhone" />
</Target>
<!-- End Region -->
<!-- Region Packaging Targets -->
<!-- *********************************************************************** -->
<!-- WARNING -->
<!-- -->
<!-- Packaging is decoupled from the Build by design. It's up to whoever -->
<!-- creates the package to first make sure that the build is up to date. -->
<!-- *********************************************************************** -->
<Target Name="PackageNuGet" Label="Creates the NuGet package">
<Message Text="******************************************************************" />
<Message Text="* Creating the Nuget $(Configuration) package" />
<Message Text="******************************************************************" />
<Exec WorkingDirectory="$(ProjectBaseDir)"
Command="&quot;$(NugetExecutable)&quot; pack $(NuspecDirectory)\nunit.runners.xamarin.nuspec -BasePath &quot;$(ProjectBaseDir)&quot; -OutputDirectory &quot;$(ConfigurationBuildDir)&quot; -Properties version=$(NugetVersion)" />
</Target>
<!-- End Region -->
<!-- Region Item Groups -->
<ItemGroup Label="Projects for building Xamarin runners">
<RunnerProjects Include="$(ProjectSrcDir)\runner\nunit.runner.Droid\nunit.runner.Droid.csproj" />
<RunnerProjects Include="$(ProjectSrcDir)\runner\nunit.runner.iOS\nunit.runner.iOS.csproj" />
</ItemGroup>
<ItemGroup Label="Android test project">
<AndroidProjects Include="$(ProjectSrcDir)\tests\nunit.runner.tests.Droid\nunit.runner.tests.Droid.csproj" />
</ItemGroup>
<ItemGroup Label="iOS test project">
<IosProjects Include="$(ProjectSrcDir)\tests\nunit.runner.tests.iOS\nunit.runner.tests.iOS.csproj" />
</ItemGroup>
<!-- End Region -->
</Project>