forked from ninject/Ninject.Extensions.Logging
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathNinject.Extensions.Logging.log4net.build
131 lines (124 loc) · 6.32 KB
/
Ninject.Extensions.Logging.log4net.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
<?xml version="1.0" encoding="utf-8"?>
<project name="Ninject.log4net" >
<property name="product.assembly.log4net" value="${product.name}.Log4Net.dll" overwrite="false"/>
<property name="product.assembly.test.log4net" value="${product.name}.log4net.Test.dll" overwrite="false"/>
<target name="buildLog4Net" unless="${string::contains(build.platform, 'silverlight')}">
<property name="current.path.lib.log4net" value="${path.lib}/log4Net/mono-2.0" if="${string::contains(build.platform, 'mono')}" />
<property name="current.path.lib.log4net" value="${path.lib}/log4Net/net-4.0" if="${string::contains(build.platform, 'net-4.')}" />
<property name="current.path.lib.log4net" value="${path.lib}/log4Net/${build.platform}" unless="${string::contains(build.platform, 'mono') or string::contains(build.platform, 'net-4.')}" />
<copy todir="${current.path.build}/log4net/lib">
<fileset basedir="${current.path.lib.log4net}">
<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}/log4net/${product.assembly.log4net}"
doc="${current.path.build}/log4net/${product.name}.Log4Net.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}.Log4Net/**/*.cs"/>
</sources>
<references>
<include name="mscorlib.dll"/>
<include name="System.dll"/>
<include name="System.Core.dll"/>
<include name="${current.path.lib.log4net}/log4net.dll"/>
<include name="${path.lib}/Ninject/${build.platform}/Ninject.dll"/>
<include name="${current.path.build}/${product.assembly}"/>
</references>
</csc>
</target>
<target name="compile-log4net-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.log4net" value="${path.build}/${build.platform}/tests/log4net"/>
<mkdir dir="${current.path.test.log4net}"/>
<copy todir="${current.path.test.log4net}" flatten="true">
<fileset basedir="${current.path.test}">
<include name="**/*.dll"/>
</fileset>
</copy>
<copy todir="${current.path.test.log4net}">
<fileset basedir="${path.tools.xunit}">
<include name="xunit.dll"/>
</fileset>
</copy>
<copy todir="${current.path.test.log4net}" if="${not(string::contains(build.platform, 'net-4.0'))}">
<fileset basedir="${path.tools.moq}/net35">
<include name="Moq.dll"/>
</fileset>
</copy>
<copy todir="${current.path.test.log4net}" if="${string::contains(build.platform, 'net-4.0')}">
<fileset basedir="${path.tools.moq}/net40">
<include name="Moq.dll"/>
</fileset>
</copy>
<copy todir="${current.path.test.log4net}" flatten="true">
<fileset basedir="${current.path.build}/log4net">
<include name="**/*.dll"/>
</fileset>
</copy>
<copy todir="${current.path.test.log4net}" if="${string::contains(build.platform, 'net-4.0')}">
<fileset basedir="${path.tools.fluentassertions}/Net-4.0">
<include name="FluentAssertions.dll"/>
</fileset>
</copy>
<copy todir="${current.path.test.log4net}" unless="${string::contains(build.platform, 'net-4.0')}">
<fileset basedir="${path.tools.fluentassertions}/Net-3.5">
<include name="FluentAssertions.dll"/>
</fileset>
</copy>
<csc noconfig="true" warnaserror="true" target="library" debug="${build.debug}" optimize="${build.optimize}" define="${build.defines}"
output="${current.path.test.log4net}/${product.assembly.test.log4net}">
<sources basedir="${path.src}">
<include name="${product.name}.Log4Net.Test/**/*.cs"/>
</sources>
<references basedir="${current.path.test.log4net}">
<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.log4net}/log4net.dll"/>
<include name="${product.assembly}"/>
<include name="${product.assembly.log4net}"/>
<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="testLog4Net" depends="compile-log4net-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.log4net}"
commandline="${product.assembly.test.log4net} /html ${current.path.test.log4net}/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.log4net}"
commandline="${path.tools.xunit.console} ${product.assembly.test.log4net} /html ${current.path.test.log4net}/results.html"
failonerror="true"/>
</if>
</target>
<target name="nuget-log4net">
<property name="nuget.sourcedir" value="${path.base}/nuget-log4net" />
<property name="nuget.basedir" value="${path.base}/build/nuget-log4net" />
<property name="nuget.platforms" value="net-3.5-client,net-4.0-client,net-4.5" />
<property name="nuget.name" value="${product.name}.Log4Net" />
<property name="nuget.releaseDirectory" value="${path.build}\${build.platform}\release\log4net" 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-log4net_symbol" />
<property name="nuget.project" value="${path.src}/${product.name}.Log4Net/${product.name}.Log4Net.csproj" />
<property name="nant.settings.currentframework" value="net-4.0"/>
<msbuild project="${nuget.project}" />
<call target="nuget-run"/>
</target>
</project>