-
Notifications
You must be signed in to change notification settings - Fork 186
/
Waffle.proj
97 lines (94 loc) · 5.38 KB
/
Waffle.proj
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="all" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" >
<PropertyGroup>
<BuildFolder>$(MSBuildProjectDirectory)\Build</BuildFolder>
<PackagesFolder>$(MSBuildProjectDirectory)\.nuget\packages</PackagesFolder>
<SourceFolder>$(MSBuildProjectDirectory)\Source</SourceFolder>
<MSBuildCommunityTasksPath>$(PackagesFolder)\MSBuildTasks.1.5.0.235\tools</MSBuildCommunityTasksPath>
<NUnitConsoleRunnerPath>$(PackagesFolder)\NUnit.ConsoleRunner.3.17.0\tools</NUnitConsoleRunnerPath>
</PropertyGroup>
<Import Project="$(MSBuildCommunityTasksPath)\MSBuild.Community.Tasks.Targets"/>
<Import Project="Version.proj"/>
<PropertyGroup Condition="'$(Configuration)'==''">
<Configuration>Release</Configuration>
</PropertyGroup>
<PropertyGroup>
<ReleaseDir>target\$(Configuration)\Waffle</ReleaseDir>
<MSBuild_4_0_ExeFilePath>%SystemRoot%\Microsoft.NET\Framework\v4.0.30319\msbuild.exe</MSBuild_4_0_ExeFilePath>
</PropertyGroup>
<Target Name="configurations">
<CreateItem Include="$(Configuration)">
<Output TaskParameter="Include" ItemName="Configuration" />
</CreateItem>
</Target>
<PropertyGroup>
<ProductName>WAFFLE</ProductName>
<CompanyName>Application Security Inc.</CompanyName>
<Copyright>Copyright (c) Application Security Inc. & Contributors</Copyright>
<Trademark>All Rights Reserved</Trademark>
<MajorVersion>1</MajorVersion>
<MinorVersion>9</MinorVersion>
<RevisionVersion>0</RevisionVersion>
</PropertyGroup>
<Target Name="all" DependsOnTargets="configurations" Inputs="@(Configuration)" Outputs="target\%(Configuration.FileName)">
<CallTarget Targets="clean" />
<CallTarget Targets="version" />
<CallTarget Targets="build" />
<CallTarget Targets="test" />
<CallTarget Targets="drop" />
<!--<CallTarget Targets="jar" Condition="'%(Configuration.Identity)'=='Release'" />-->
<CallTarget Targets="zip" />
</Target>
<Target Name="clean" DependsOnTargets="configurations" Inputs="@(Configuration)" Outputs="target\%(Configuration.FileName)">
<Message Importance="high" Text="Cleaning project, %(Configuration.Identity) ..." />
<DeleteTree Directories="target" Recursive="true" />
<DeleteTree Directories="Source\**\bin" Recursive="true" />
<DeleteTree Directories="Source\**\obj" Recursive="true" />
<DeleteTree Directories="Source\**\target" Recursive="true" />
<MSBuild Projects="Waffle.sln" Targets="Clean" Properties="Configuration=%(Configuration.Identity)" />
<!-- This directory is getting recreated from MSBuild above, Delete it again -->
<DeleteTree Directories="Source\**\obj" Recursive="true" />
<Delete Files="Source\Common\GlobalAssemblyInfo.cs" />
<Delete Files="Source\Version\Version.properties" />
<Delete Files="Source\Version\Version.wxi" />
</Target>
<Target Name="build" DependsOnTargets="version;configurations" Inputs="@(Configuration)" Outputs="target\%(Configuration.FileName)">
<Message Importance="high" Text="Compiling and linking project, %(Configuration.Identity) ..." />
<MSBuild Projects="Waffle.sln" Targets="Build" Properties="Configuration=%(Configuration.Identity)" />
</Target>
<Target Name="test" DependsOnTargets="configurations" Inputs="@(Configuration)" Outputs="target\%(Configuration.FileName)">
<Message Importance="high" Text="Running tests, %(Configuration.Identity) ..." />
<CreateItem Include="Source\**\bin\%(Configuration.Identity)\Waffle.*UnitTests.dll">
<Output TaskParameter="Include" ItemName="UnitTestAssemblies"/>
</CreateItem>
<Message Text="@(UnitTestAssemblies)" />
<exec Command="$(NUnitConsoleRunnerPath)\nunit3-console.exe "@(UnitTestAssemblies)""/>
</Target>
<Target Name="drop" DependsOnTargets="version;configurations" Inputs="@(Configuration)" Outputs="target\%(Configuration.FileName)">
<CreateItem Include="Source\**\%(Configuration.Identity)/Waffle.*.dll" Exclude="Source\**\%(Configuration.Identity)/Waffle.*UnitTests.dll">
<Output TaskParameter="Include" ItemName="BinaryFiles" />
</CreateItem>
<CreateItem Include="Source\**\%(Configuration.Identity)/Waffle.*.msm">
<Output TaskParameter="Include" ItemName="BinaryFiles" />
</CreateItem>
<Copy SourceFiles="@(BinaryFiles)" DestinationFolder="$(ReleaseDir)\Bin" />
<CreateItem Include="Source\**\*.vbs">
<Output TaskParameter="Include" ItemName="SampleFiles" />
</CreateItem>
<Copy SourceFiles="@(SampleFiles)" DestinationFolder="$(ReleaseDir)\Samples" />
</Target>
<Target Name="jar" DependsOnTargets="version">
<exec WorkingDirectory="Source\JNA" Command="mvn clean install" />
<CreateItem Include="Source\JNA\waffle-distro\target\waffle-distro\**\*.*">
<Output TaskParameter="Include" ItemName="JnaFiles"/>
</CreateItem>
<Copy SourceFiles="@(JnaFiles)" DestinationFolder="$(ReleaseDir)\%(RecursiveDir)" />
</Target>
<Target Name="zip" DependsOnTargets="version">
<CreateItem Include="target\$(Configuration)\**\*" Exclude="target\$(Configuration)\*.zip">
<Output TaskParameter="Include" ItemName="PackageFiles" />
</CreateItem>
<Zip WorkingDirectory="target\$(Configuration)" ZipFileName="target\$(Configuration)\Waffle.$(Major).$(Minor).$(Revision).zip" Files="@(PackageFiles)" />
<Message Text="Version: $(Major).$(Minor).$(Build).$(Revision)"/>
</Target>
</Project>