Skip to content

Commit 97f13e7

Browse files
authored
Remove unused code in build scripts (#1410)
1 parent 2e409d0 commit 97f13e7

File tree

2 files changed

+3
-97
lines changed

2 files changed

+3
-97
lines changed

build-common/common.xml

+3-69
Original file line numberDiff line numberDiff line change
@@ -25,25 +25,14 @@
2525
<property name="nant-version.current" value="${assemblyname::get-version(assembly::get-name(nant::get-assembly()))}" />
2626
<property name="nant-version.required" value="0.91.4312.0" /> <!-- Nant 0.91 release version -->
2727

28-
<!--
29-
Path to the folder that contain the external assemblies. For net-2.0 the values will
30-
be lib, lib/net, and lib/net/2.0 respectively.
31-
-->
28+
<!-- Path to the folder that contain the external assemblies -->
3229
<property name="lib.dir" value="lib" dynamic="true" />
33-
<property name="lib.family.dir" value="${path::combine(lib.dir, framework::get-family(framework::get-target-framework()))}" dynamic="true" />
34-
<property name="lib.framework.dir" value="${path::combine(lib.family.dir, version::to-string(framework::get-version()))}" dynamic="true" />
3530

3631
<!-- This is used only for build folder -->
3732
<!-- TODO: Either remove or refactor to use NHibernate.props -->
3833
<property name="project.version" value="5.0.0" overwrite="false" />
3934
<property name="project.version.numeric" value="5.0.0" overwrite="false" />
4035

41-
<!-- debug|release -->
42-
<property name="build.defines" value="" />
43-
44-
<!-- platform specific properties. These are the defaults -->
45-
<property name="current.build.defines" value="${build.defines}" />
46-
4736
<!-- properties used to connect to database for testing -->
4837
<include buildfile="nhibernate-properties.xml" />
4938

@@ -70,65 +59,10 @@
7059

7160
<property name="build.root.dir" value="${root.dir}/build/${build.name}" />
7261
<property name="build.dir" value="${build.root.dir}" />
73-
<property name="bin.dir" value="${build.dir}/bin/${nant.settings.currentframework}" />
62+
<property name="bin.dir" value="${build.dir}/bin" />
7463
<property name="testresults.dir" value="${bin.dir}/test-results" />
7564
<property name="tools.dir" value="${root.dir}/Tools"/>
7665
</target>
77-
78-
79-
80-
<target name="set-framework-configuration">
81-
<if test="${not(target::exists('set-'+framework::get-target-framework()+'-framework-configuration'))}">
82-
<fail message="The '${framework::get-target-framework()}' framework is not supported by this version of NHibernate." />
83-
</if>
84-
<call target="set-${framework::get-target-framework()}-framework-configuration" />
85-
</target>
86-
87-
<target name="set-net-4.0-framework-configuration">
88-
<property name="nant.settings.currentframework" value="net-4.0" />
89-
<property name="current.build.defines" value="${build.defines}NET,NET_2_0,NET_3_5,NET_4_0" />
90-
<!-- not using SDK_v2_0 because ndoc throws an exception -->
91-
<property name="link.sdkdoc.version" value="SDK_v1_1" />
92-
<!-- merge should work with 4.0 when compiling for 4.0 -->
93-
<property name="merge.targetplatform" value="v4" />
94-
<property name="referenceassemblies.dir" value="${environment::get-folder-path('ProgramFiles')}\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1" />
95-
</target>
96-
97-
<target name="set-net-3.5-framework-configuration">
98-
<property name="nant.settings.currentframework" value="net-3.5" />
99-
<property name="current.build.defines" value="${build.defines}NET,NET_2_0,NET_3_5" />
100-
<!-- not using SDK_v2_0 because ndoc throws an exception -->
101-
<property name="link.sdkdoc.version" value="SDK_v1_1" />
102-
<!-- merge should work with 2.0 when compiling for 3.5 -->
103-
<property name="merge.targetplatform" value="v2" />
104-
<property name="referenceassemblies.dir" value="${environment::get-folder-path('ProgramFiles')}\Reference Assemblies\Microsoft\Framework\v3.5" />
105-
</target>
106-
107-
<target name="set-net-2.0-framework-configuration">
108-
<property name="nant.settings.currentframework" value="net-2.0" />
109-
<property name="current.build.defines" value="${build.defines}NET,NET_2_0" />
110-
<!-- not using SDK_v2_0 because ndoc throws an exception -->
111-
<property name="link.sdkdoc.version" value="SDK_v1_1" />
112-
<property name="merge.targetplatform" value="v2" />
113-
</target>
114-
115-
116-
<target name="set-mono-3.5-framework-configuration">
117-
<property name="nant.settings.currentframework" value="mono-3.5" />
118-
<property name="current.build.defines" value="${build.defines}NET,NET_2_0,NET_3_5,MONO" />
119-
<!-- not using SDK_v2_0 because ndoc throws an exception -->
120-
<property name="link.sdkdoc.version" value="SDK_v1_1" />
121-
<!-- merge should work with 2.0 when compiling for 3.5 -->
122-
<property name="merge.targetplatform" value="v2" />
123-
</target>
124-
125-
<target name="set-mono-2.0-framework-configuration">
126-
<property name="nant.settings.currentframework" value="mono-2.0" />
127-
<property name="current.build.defines" value="${build.defines}NET,NET_2_0,MONO" />
128-
<!-- not using SDK_v2_0 because ndoc throws an exception -->
129-
<property name="link.sdkdoc.version" value="SDK_v1_1" />
130-
<property name="merge.targetplatform" value="v2" />
131-
</target>
13266

13367
<target name="display-current-runtime">
13468
<echo message="" />
@@ -146,7 +80,7 @@
14680
</target>
14781

14882
<target name="common.init"
149-
depends="set-framework-configuration set-project-configuration"
83+
depends="set-project-configuration"
15084
description="Initializes build properties">
15185

15286
<fileset id="project.sources" failonempty="true">

default.build

-28
Original file line numberDiff line numberDiff line change
@@ -76,38 +76,10 @@
7676
<nant buildfile="doc/documentation.build" target="api" />
7777
</target>
7878

79-
<target name="build-all-frameworks" depends="init">
80-
<!-- Save the current framework -->
81-
<property name="current.framework.saved" value="${nant.settings.currentframework}" />
82-
83-
<!-- Execute build for each framework -->
84-
<foreach item="String" delim=" " property="framework" in="${supported.frameworks}">
85-
<call target="set-${framework}-framework-configuration" />
86-
<call target="build" />
87-
</foreach>
88-
89-
<!-- Reset the current framework to the saved value -->
90-
<call target="set-${current.framework.saved}-framework-configuration" />
91-
</target>
92-
9379
<target name="binaries" depends="init">
9480
<call target="build" />
9581
</target>
9682

97-
<target name="test-all-frameworks" depends="init">
98-
<!-- Save the current framework -->
99-
<property name="current.framework.saved" value="${nant.settings.currentframework}" />
100-
101-
<!-- Execute build for each framework -->
102-
<foreach item="String" delim=" " property="framework" in="${supported.frameworks}">
103-
<call target="set-${framework}-framework-configuration" />
104-
<call target="test" />
105-
</foreach>
106-
107-
<!-- Reset the current framework to the saved value -->
108-
<call target="set-${current.framework.saved}-framework-configuration" />
109-
</target>
110-
11183
<target name="reports" depends="init">
11284
<call target="test-all-frameworks" />
11385
<call target="test-report" />

0 commit comments

Comments
 (0)