Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
155 lines (127 sloc) 4.57 KB
<?xml version="1.0" encoding='iso-8859-1' ?>
<project
name="D9"
default="build"
xmlns="http://nant.sf.net/release/0.85/nant.xsd">
<property name="root.dir" value="." />
<include buildfile="${root.dir}/build-common/common.xml" />
<fileset id="buildfiles.all">
<!-- Files have to be in dependency order -->
<include name="src/D9.Commons/default.build" />
<include name="src/D9.NHibernate/default.build" />
<include name="src/D9.QuerySpecBuilder/default.build" />
<include name="src/D9.SQLQueryGenerator/default.build" />
<include name="src/D9.StaticMapGenerator/default.build" />
</fileset>
<target name="debug" description="Selects the debug build configuration">
<property name="project.config" value="debug" />
</target>
<target name="release" description="Selects the release build configuration">
<property name="project.config" value="release" />
</target>
<target name="quick" description="Speed up the build by skipping tests">
<property name="common.testrunner.enabled" value="false" />
</target>
<target name="build"
depends="init copy-referenced-assemblies"
description="Builds D9 in the current configuration">
<nant target="build">
<buildfiles refid="buildfiles.all" />
</nant>
</target>
<target name="rebuild"
depends="init recreate-build-directory build"
description="Rebuilds D9 in the current configuration" />
<target name="init" depends="common.init">
<mkdir dir="${build.dir}" />
<mkdir dir="${testresults.dir}" />
<call target="common.find-svninfo" />
<call target="common.find-nunit" if="${common.testrunner.enabled}" />
</target>
<target name="clean" description="Deletes current build artifacts" depends="common.init">
<delete dir="${build.dir}" failonerror="false" />
<delete>
<fileset basedir="${build.base.dir}">
<include name="*.*" />
</fileset>
</delete>
</target>
<target name="clean-vs" description="Delete Visual Studio artifacts" depends="common.init">
<!-- NB - this target will fail if you have a solution open in Visual Studio -->
<echo message="Gathering files for removal..." />
<foreach item="File" property="filename">
<in>
<items basedir=".">
<include name="**/*.suo" />
<include name="*/*.csproj.user" />
</items>
</in>
<do>
<delete file="${filename}" />
</do>
</foreach>
<echo message="Gathering folders for removal..." />
<foreach item="Folder" property="foldername">
<in>
<items basedir=".">
<include name="**/obj" />
<include name="**/_ReSharper*" />
</items>
</in>
<do>
<delete dir="${foldername}" failonerror="false" />
</do>
</foreach>
</target>
<target name="cleanall" description="Deletes all build artifacts" depends="common.init">
<echo message="Deleting all builds from all configurations" />
<delete dir="${build.base.dir}" failonerror="false" />
<call target="clean-vs" />
</target>
<target name="recreate-build-directory">
<echo message="Current Directory is ${project::get-base-directory()}" />
<echo message="Build Directory is ${build.dir}" />
<!-- Prepare build directory -->
<delete dir="${build.dir}" failonerror="false" />
<mkdir dir="${build.dir}" />
<mkdir dir="${testresults.dir}" />
<call target="copy-referenced-assemblies" />
<property name="build.rebuild" value="true" />
</target>
<target name="copy-referenced-assemblies">
<copy todir="${build.dir}" >
<fileset basedir="${tools.dir}/nunit">
<include name="nunit.framework.dll" />
</fileset>
</copy>
<copy todir="${build.dir}" >
<fileset basedir="${tools.dir}/nunitframeworkextensionmethods">
<include name="NUnit.Framework.ExtensionMethods.dll" />
</fileset>
</copy>
<copy todir="${build.dir}" >
<fileset basedir="${tools.dir}/SQLite">
<include name="System.Data.SQLite.*" />
</fileset>
</copy>
<foreach item="String" delim=" " property="dependency.dir"
in="NHibernate log4net">
<!-- Copy framework-neutral libraries -->
<copy todir="${build.dir}" >
<fileset basedir="${lib.dir}/${dependency.dir}">
<include name="*.dll" />
<include name="*.xml" />
<include name="*.license.txt" />
</fileset>
</copy>
</foreach>
</target>
<target name="generate-assemblyinfo"
depends="init"
description="Generate AssemblyInfo files">
<property name="visual-studio" value="true" />
<nant target="generate-assemblyinfo">
<buildfiles refid="buildfiles.all" />
</nant>
</target>
</project>