forked from ninject/Ninject.Extensions.Logging
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathNinject.Extensions.Logging.NLog.build
112 lines (103 loc) · 5.38 KB
/
Ninject.Extensions.Logging.NLog.build
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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
<?xml version="1.0" encoding="utf-8"?>
<project name="Ninject.NLog">
<property name="product.assembly.NLog" value="${product.name}.NLog.dll" overwrite="false"/>
<property name="product.assembly.test.NLog" value="${product.name}.NLog.Test.dll" overwrite="false"/>
<target name="buildNLog" unless="${string::contains(build.platform, 'silverlight')}">
<property name="current.path.lib.NLog" value="${path.lib}/NLog/net-3.5" unless="${nant.settings.currentframework == 'mono-2.0' or nant.settings.currentframework == 'netcf-3.5'}" />
<property name="current.path.lib.NLog" value="${path.lib}/NLog/${build.platform}" if="${nant.settings.currentframework == 'mono-2.0' or nant.settings.currentframework == 'netcf-3.5'}" />
<copy todir="${current.path.build}/NLog/lib">
<fileset basedir="${current.path.lib.NLog}">
<include name="**/*.dll"/>
<include name="**/*.xml"/>
</fileset>
</copy>
<csc noconfig="true" warnaserror="true" target="library" debug="${build.debug}" optimize="${build.optimize}" define="${build.defines}"
output="${current.path.build}/NLog/${product.assembly.NLog}"
doc="${current.path.build}/NLog/${product.name}.NLog.xml" keyfile="${path.src}/${product.keyfile}">
<arg line="/filealign:512" unless="${nant.settings.currentframework == 'mono-2.0'}"/>
<sources basedir="${path.src}">
<include name="${build.asminfo}"/>
<include name="${product.name}.NLog/**/*.cs"/>
</sources>
<references>
<include name="mscorlib.dll"/>
<include name="System.dll"/>
<include name="System.Core.dll"/>
<include name="System.Web.dll" unless="${build.platform == 'silverlight-2.0'}"/>
<include name="${current.path.lib.NLog}/NLog.dll"/>
<include name="${path.lib}/Ninject/${build.platform}/Ninject.dll"/>
<include name="${current.path.build}/${product.assembly}"/>
</references>
</csc>
</target>
<target name="compile-NLog-tests" depends="core compile-tests" unless="${skip.tests}" if="${not(string::contains(build.platform, 'silverlight') or build.platform == 'netcf-3.5')}">
<property name="current.path.test.NLog" value="${path.build}/${build.platform}/tests/NLog"/>
<mkdir dir="${current.path.test.NLog}"/>
<property name="target" value="${current.path.test.NLog}" />
<call target="CopyXUnit-Target"/>
<call target="CopyMoq-Target"/>
<call target="CopyFluentAssertions-Target"/>
<copy todir="${current.path.test.NLog}" flatten="true">
<fileset basedir="${current.path.test}">
<include name="**/*.dll"/>
</fileset>
</copy>
<copy todir="${current.path.test.NLog}" flatten="true">
<fileset basedir="${current.path.build}/NLog">
<include name="**/*.dll"/>
</fileset>
</copy>
<csc noconfig="true" warnaserror="true" target="library" debug="${build.debug}" optimize="${build.optimize}" define="${build.defines}"
output="${current.path.test.NLog}/${product.assembly.test.NLog}">
<sources basedir="${path.src}">
<include name="${product.name}.NLog.Test/**/*.cs"/>
</sources>
<references basedir="${current.path.test.NLog}">
<include name="mscorlib.dll"/>
<include name="System.dll"/>
<include name="System.Core.dll"/>
<include name="Moq.dll"/>
<include name="xunit.dll"/>
<include name="FluentAssertions.dll"/>
<include name="${current.path.lib.NLog}/NLog.dll"/>
<include name="${product.assembly}"/>
<include name="${product.assembly.NLog}"/>
<include name="${current.path.test}/${product.assembly.test}"/>
<include name="${path.lib}/Ninject/${build.platform}/Ninject.dll"/>
</references>
<nowarn>
<warning number="1584"/>
</nowarn>
</csc>
</target>
<target name="testNLog" depends="compile-NLog-tests" unless="${skip.tests}" if="${not(string::contains(build.platform, 'silverlight') or build.platform == 'netcf-3.5')}">
<exec
program="${path.tools.xunit.console}"
workingdir="${current.path.test.NLog}"
commandline="${product.assembly.test.NLog} /html ${current.path.test.NLog}/results.html"
failonerror="true"
if="${not(string::contains(build.platform, 'mono')) or teamcity}"/>
<if test="${string::contains(build.platform, 'mono') and not(teamcity)}">
<exec
program="${framework::get-runtime-engine(framework::get-target-framework())}"
workingdir="${current.path.test.NLog}"
commandline="${path.tools.xunit.console} ${product.assembly.test.NLog} /html ${current.path.test.NLog}/results.html"
failonerror="true"/>
</if>
</target>
<target name="nuget-nlog">
<property name="nuget.sourcedir" value="${path.base}/nuget-nlog" />
<property name="nuget.basedir" value="${path.base}/build/nuget-nlog" />
<property name="nuget.platforms" value="net-3.5-client,net-4.0-client,net-4.5" />
<property name="nuget.name" value="${product.name}.nlog" />
<property name="nuget.releaseDirectory" value="${path.build}\${build.platform}\release\nlog" dynamic="true"/>
<property name="nuget.dependencies" value="Ninject.Extensions.Logging" />
<property name="nuget.additionalFiles" value="-" />
<property name="nuget.packageName" value="${nuget.name}${product.packagePostfix}" />
<property name="nuget.symbol.basedir" value="${path.base}/build/nuget-nlog_symbol" />
<property name="nuget.project" value="${path.src}/${product.name}.NLog/${product.name}.NLog.csproj" />
<property name="nant.settings.currentframework" value="net-4.0"/>
<msbuild project="${nuget.project}" />
<call target="nuget-run"/>
</target>
</project>