forked from ninject/Ninject.Extensions.Logging
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathNinject.Extensions.Logging.NLog2.build
195 lines (182 loc) · 10.1 KB
/
Ninject.Extensions.Logging.NLog2.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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
<?xml version="1.0" encoding="utf-8"?>
<project name="Ninject.NLog2" default="all">
<property name="product.assembly.NLog2" value="${product.name}.NLog2.dll" overwrite="false"/>
<property name="product.assembly.test.NLog2" value="${product.name}.NLog2.Test.dll" overwrite="false"/>
<target name="buildNLog2">
<property name="current.path.lib.NLog2" value="${path.lib}/NLog2/mono-2.0" if="${string::contains(build.platform, 'mono')}" />
<property name="current.path.lib.NLog2" value="${path.lib}/NLog2/${build.platform}" unless="${string::contains(build.platform, 'mono')}" />
<copy todir="${current.path.build}/NLog2/lib">
<fileset basedir="${current.path.lib.NLog2}">
<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}/NLog2/${product.assembly.NLog2}"
doc="${current.path.build}/NLog2/${product.name}.NLog2.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}.NLog2/**/*.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.NLog2}/NLog.dll"/>
<include name="${path.lib}/Ninject/${build.platform}/Ninject.dll"/>
<include name="${current.path.build}/${product.assembly}"/>
</references>
</csc>
</target>
<target name="compile-NLog2-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.NLog2" value="${path.build}/${build.platform}/tests/NLog2"/>
<mkdir dir="${current.path.test.NLog2}"/>
<property name="target" value="${current.path.test.NLog2}" />
<call target="CopyXUnit-Target"/>
<call target="CopyMoq-Target"/>
<call target="CopyFluentAssertions-Target"/>
<copy todir="${current.path.test.NLog2}" flatten="true">
<fileset basedir="${current.path.test}">
<include name="**/*.dll"/>
</fileset>
</copy>
<copy todir="${current.path.test.NLog2}" flatten="true">
<fileset basedir="${current.path.build}/NLog2">
<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.NLog2}/${product.assembly.test.NLog2}">
<sources basedir="${path.src}">
<include name="${product.name}.NLog2.Test/**/*.cs"/>
</sources>
<references basedir="${current.path.test.NLog2}">
<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.NLog2}/NLog.dll"/>
<include name="${product.assembly}"/>
<include name="${product.assembly.NLog2}"/>
<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="testNLog2" depends="compile-NLog2-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.NLog2}"
commandline="${product.assembly.test.NLog2} /html ${current.path.test.NLog2}/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.NLog2}"
commandline="${path.tools.xunit.console} ${product.assembly.test.NLog2} /html ${current.path.test.NLog2}/results.html"
failonerror="true"/>
</if>
</target>
<target name="compile-silverlight-tests-NLog2" depends="core" unless="${skip.tests or skip.silverlightTests}" if="${string::contains(build.platform, 'silverlight')}">
<property name="current.path.test.NLog2" value="${path.build}/${build.platform}/tests/NLog2"/>
<property name="product.assembly.silverlighttest.NLog2" value="${product.name}.NLog2.SilverlightTests.xap"/>
<mkdir dir="${current.path.test}"/>
<property name="target" value="${current.path.test.NLog2}" />
<call target="CopyXUnit-SL-Target"/>
<call target="CopyMoq-SL-Target"/>
<call target="CopyFluentAssertions-SL-Target"/>
<copy todir="${current.path.test.NLog2}" flatten="true">
<fileset basedir="${current.path.build}">
<include name="*.dll"/>
<include name="lib/*.dll"/>
</fileset>
</copy>
<copy todir="${current.path.test.NLog2}" flatten="true">
<fileset basedir="${current.path.test}">
<include name="**/*.dll"/>
</fileset>
</copy>
<copy todir="${current.path.test.NLog2}" flatten="true">
<fileset basedir="${current.path.build}/NLog2">
<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.NLog2}/${product.name}.NLog2.SilverlightTests.dll">
<sources basedir="${path.src}">
<include name="${product.name}.Tests/**/*.cs"/>
<include name="${product.name}.NLog2.Test/**/*.cs"/>
<include name="${product.name}.NLog2.SilverlightTests/*.cs"/>
<include name="${product.name}.NLog2.SilverlightTests/Properties/*.cs"/>
<exclude name="${product.name}.Tests/MSTestAttributes/*.cs"/>
<exclude name="${product.name}.Tests/Properties/*.cs"/>
<exclude name="${product.name}.NLog2.Test/Properties/*.cs"/>
</sources>
<references basedir="${current.path.test.NLog2}">
<include name="mscorlib.dll"/>
<include name="System.dll"/>
<include name="System.Core.dll"/>
<include name="System.Windows.dll"/>
<include name="System.Windows.Browser.dll"/>
<include name="System.Net.dll"/>
<include name="Microsoft.Phone.dll" if="${string::contains(build.platform, 'wp7')}"/>
<include name="Microsoft.Phone.Interop.dll" if="${string::contains(build.platform, 'wp7')}"/>
<include name="Moq.Silverlight.dll" unless="${string::contains(build.platform, 'wp7')}"/>
<include name="Castle.Core.dll" if="${string::contains(build.platform, 'silverlight-4.0') or string::contains(build.platform, 'silverlight-5.0')}"/>
<include name="Castle.Core-Silverlight.dll" unless="${string::contains(build.platform, 'silverlight-4.0') or string::contains(build.platform, 'silverlight-5.0')}"/>
<include name="Castle.DynamicProxy-Silverlight.dll" unless="${build.platform == 'silverlight-4.0' or build.platform == 'silverlight-5.0'}"/>
<include name="xunit.runner.silverlight.dll"/>
<include name="xunit-silverlight.dll"/>
<include name="FluentAssertions.Silverlight.dll"/>
<include name="${current.path.lib.NLog2}/NLog.dll"/>
<include name="${product.assembly}"/>
<include name="${product.assembly.NLog2}"/>
<include name="${current.path.test}/${product.assembly.test}"/>
<include name="${path.lib}/Ninject/${build.platform}/Ninject.dll"/>
</references>
<nowarn>
<warning number="1584"/>
</nowarn>
</csc>
<zip zipfile="${current.path.test.NLog2}/${product.assembly.silverlighttest.NLog2}">
<fileset basedir="${current.path.test.NLog2}">
<include name="*.dll" />
</fileset>
<fileset basedir="${path.src}/${product.name}.NLog2.SilverlightTests">
<include name="AppManifest.xaml" if="${string::contains(build.platform, 'silverlight-4.0')}"/>
</fileset>
<fileset basedir="${path.src}/${product.name}.NLog2.SilverlightTests/Silverlight3">
<include name="AppManifest.xaml" unless="${string::contains(build.platform, 'silverlight-4.0')}"/>
</fileset>
</zip>
</target>
<target name="silverlight-test-NLog2" depends="compile-silverlight-tests-NLog2" unless="${skip.tests or skip.silverlightTests}" if="${string::contains(build.platform, 'silverlight')}">
<property name="cmdLine" value='-x"${product.assembly.silverlighttest.NLog2}" --teamcity --debug' if="${teamcity}"/>
<property name="cmdLine" value='-x"${product.assembly.silverlighttest.NLog2}"' unless="${teamcity}"/>
<exec program="${path.tools.statlight}" workingdir="${current.path.test.NLog2}" commandline="${cmdLine}" failonerror="true" unless="${string::contains(build.platform, 'wp')}" />
<exec program="${path.tools.statlight}" workingdir="${current.path.test.NLog2}" commandline="${cmdLine} --UsePhoneEmulator" failonerror="true" if="${string::contains(build.platform, 'wp')}" />
</target>
<target name="nuget-nlog2">
<property name="nuget.sourcedir" value="${path.base}/nuget-nlog2" />
<property name="nuget.basedir" value="${path.base}/build/nuget-nlog2" />
<property name="nuget.platforms" value="net-3.5-client,net-4.0-client,net-4.5,silverlight-5.0,silverlight-4.0,silverlight-3.0,silverlight-2.0,silverlight-4.0-wp7,silverlight-4.0-wp71" />
<property name="nuget.name" value="${product.name}.nlog2" />
<property name="nuget.releaseDirectory" value="${path.build}\${build.platform}\release\nlog2" 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-nlog2_symbol" />
<property name="nuget.project" value="${path.src}/${product.name}.NLog2/${product.name}.NLog2.csproj" />
<property name="nant.settings.currentframework" value="net-4.0"/>
<msbuild project="${nuget.project}" />
<call target="nuget-run"/>
</target>
</project>