Skip to content

Commit

Permalink
setup compilation of fluint extensions and included them in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Simeon Bateman committed Mar 1, 2011
1 parent 904dd0e commit cdaddb1
Show file tree
Hide file tree
Showing 5 changed files with 143 additions and 5 deletions.
13 changes: 12 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,23 @@
.DS_Store
FlexUnit4/bin/*
FlexUnit4/target/*
*/bin-debug
FlexUnit4UIListener/bin/*
FlexUnit4CIListener/bin/*
FlexUnit4FluintExtensions/bin/*
FlexUnit4FluintExtensions/target/*
FlexUnit4CIListener/target/*
FlexUnit4CIListener/libs/*
FlexUnit4AirCIListener/bin/*
FlexUnit4FlexCoverListener/bin/*
FlexUnit4FluintExtensions/bin/*
FlexUnit4FlexCoverListener/libs/*
FlexUnit4FlexCoverListener/target/*
FlexUnit4CIListener/bin/*
FlexUnit4AntTasks/target/*
FlexUnit4Test/libs/*
FlexUnit4Test/target/*
FlexUnit4UIListener/libs/*
FlexUnit4UIListener/target/*
.metadata
.actionScriptProperties
*/.settings
110 changes: 110 additions & 0 deletions FlexUnit4FluintExtensions/build.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="FlexUnit4CIListener" basedir="." default="package">
<import file="${basedir}/../utils.xml" />
<property environment="env" />

<!-- Configuration -->
<property name="build.artifactId" value="fluint-extensions" />
<property name="build.finalName" value="${build.artifactId}-${build.version}-${build.number}-${build.sdk}" />
<property name="build.packaging" value="swc" />
<property name="build.deploy.name" value="FlexUnit Fluint Extensions" />
<property name="build.deploy.description" value="Extensions to FlexUnit 4 to allow interaction with Fluint tests." />

<!-- Existing -->
<property name="src.loc" location="${basedir}/src" />
<property name="lib.loc" location="${basedir}/libs" />

<!-- Generated -->
<property name="dist.loc" location="${basedir}/target" />
<property name="sonatype.loc" location="${dist.loc}/sonatype" />
<property name="bin.loc" location="${basedir}/target/bin" />
<property name="doc.loc" location="${basedir}/target/docs" />

<!-- Setup Flex Ant Resources -->
<property name="FLEX_HOME" location="${env.FLEX_HOME}" />
<taskdef resource="flexTasks.tasks" classpath="${FLEX_HOME}/ant/lib/flexTasks.jar" />

<target name="clean">
<delete dir="${dist.loc}" failonerror="false" />
<delete failonerror="false">
<fileset dir="${lib.loc}">
<include name="flexunit*.swc" />
</fileset>
</delete>
</target>

<target name="init">
<mkdir dir="${lib.loc}" />
<mkdir dir="${dist.loc}" />
<mkdir dir="${sonatype.loc}" />
<mkdir dir="${bin.loc}" />
<mkdir dir="${doc.loc}" />

<!-- Copy required dependencies -->
<copy todir="${lib.loc}" overwrite="true" failonerror="false">
<fileset dir="${basedir}/../FlexUnit4/target">
<include name="flexunit*as3*.swc" />
</fileset>
</copy>
</target>

<target name="compile" depends="init">
<compc output="${bin.loc}/${build.finalName}.${build.packaging}">
<include-sources dir="${src.loc}" includes="*" append="true" />
<source-path path-element="${src.loc}" />
<compiler.external-library-path dir="${lib.loc}" append="true">
<include name="*.swc" />
</compiler.external-library-path>
<compiler.external-library-path dir="${FLEX_HOME}/frameworks/libs" append="true">
<include name="flex.swc" />
<include name="framework.swc" />
<include name="rpc.swc" />
<include name="utilities.swc" />
</compiler.external-library-path>
<compiler.verbose-stacktraces>true</compiler.verbose-stacktraces>
<compiler.headless-server>true</compiler.headless-server>
</compc>
</target>

<target name="report" depends="compile" if="build.report">
<java jar="${FLEX_HOME}/lib/asdoc.jar" fork="true" failonerror="true">
<jvmarg value="-Xmx256M" />
<arg line="+flexlib '${FLEX_HOME}/frameworks'" />
<arg line="-doc-sources '${src.loc}'" />
<arg line="-source-path+='${src.loc}'" />
<arg line="-output '${doc.loc}'" />
<arg line="-library-path+='${lib.loc}'" />
</java>
</target>

<target name="package" depends="report">
<copy file="${bin.loc}/${build.finalName}.${build.packaging}" todir="${dist.loc}" />
</target>

<target name="deploy" depends="package" description="Requires Ant-Contrib and GPG to work.">
<!-- Copy artifacts w/o build number for use with sonatype -->
<copy todir="${sonatype.loc}">
<fileset dir="${dist.loc}">
<include name="*.swc" />
</fileset>
<filtermapper>
<replacestring from="-${build.number}-" to="-" />
</filtermapper>
</copy>

<!-- prepare sonatype bundle -->
<sonatype-bundle dir="${sonatype.loc}"
todir="${sonatype.loc}"
pomTemplate="${basedir}/../pom.template"
artifact="${build.artifactId}"
type="${build.packaging}"
name="${build.deploy.name}"
version="${build.version}"
description="${build.deploy.description}">
<includes>
<include name="*.swc" />
<include name="pom.xml" />
</includes>
</sonatype-bundle>
</target>
</project>
6 changes: 6 additions & 0 deletions FlexUnit4Test/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,10 @@
<library-path dir="${lib.loc}" append="true">
<include name="@{include}" />
<include name="*cilistener*.swc" />
<include name="fluint*.swc" />
<include name="*flexcoverlistener*.swc" />
<include name="FlexUnit1Lib.swc" />
<include name="FlexUnit1Lib.swc" />
<include name="hamcrest-as3*.swc" />
<include name="mock-as3.swc" />
<include name="mockolate*.swc" />
Expand Down Expand Up @@ -118,6 +120,7 @@
<delete dir="${dist.loc}" />
<delete>
<fileset dir="${lib.loc}">
<exclude name="fluint-1_2.swc" />
<exclude name="FlexUnit1Lib.swc" />
<exclude name="hamcrest-as3*.swc" />
<exclude name="mock-as3.swc" />
Expand Down Expand Up @@ -146,6 +149,9 @@
</fileset>
<fileset dir="${basedir}/../FlexUnit4FlexCoverListener/target">
<include name="*.swc" />
</fileset>
<fileset dir="${basedir}/../FlexUnit4FluintExtensions/target">
<include name="*.swc" />
</fileset>
</copy>
<copy todir="${build.lib.loc}" overwrite="true">
Expand Down
Binary file removed FlexUnit4Test/libs/FlexUnit4FluintExtensions.swc
Binary file not shown.
19 changes: 15 additions & 4 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ to contribute to our CI process.
<!-- Project locations -->
<property name="anttasks.loc" location="${basedir}/FlexUnit4AntTasks" />
<property name="core.loc" location="${basedir}/FlexUnit4" />
<property name="fluint.loc" location="${basedir}/FlexUnit4FluintExtensions" />
<property name="cilistener.loc" location="${basedir}/FlexUnit4CIListener" />
<property name="tests.loc" location="${basedir}/FlexUnit4Test" />
<property name="uilistener.loc" location="${basedir}/FlexUnit4UIListener" />
Expand All @@ -38,6 +39,7 @@ to contribute to our CI process.
<!-- Ask each project to clean up -->
<ant dir="${anttasks.loc}" target="clean" inheritall="false" />
<ant dir="${core.loc}" target="clean" inheritall="false" />
<ant dir="${fluint.loc}" target="clean" inheritall="false" />
<ant dir="${cilistener.loc}" target="clean" inheritall="false" />
<ant dir="${tests.loc}" target="clean" inheritall="false" />
<ant dir="${uilistener.loc}" target="clean" inheritall="false" />
Expand Down Expand Up @@ -68,7 +70,16 @@ to contribute to our CI process.
</propertyset>
</ant>
</target>


<!-- Prepares and builds the FlexUnit4 Fluint Extensions -->
<target name="fluint" depends="core">
<ant dir="${fluint.loc}" target="package" inheritall="false">
<propertyset>
<propertyref prefix="build" />
</propertyset>
</ant>
</target>

<!-- Prepares and builds the FlexUnit4CIListener project -->
<target name="cilistener" depends="core">
<ant dir="${cilistener.loc}" target="package" inheritall="false">
Expand All @@ -88,7 +99,7 @@ to contribute to our CI process.
</target>

<!-- Prepares and builds the FlexUnit4Test project -->
<target name="test" depends="anttasks,core,cilistener,flexcoverlistener" unless="build.skipTests">
<target name="test" depends="anttasks,core,fluint,cilistener,flexcoverlistener" unless="build.skipTests">
<ant dir="${tests.loc}" target="test" inheritall="false">
<propertyset>
<propertyref prefix="build" />
Expand All @@ -99,7 +110,7 @@ to contribute to our CI process.
<target name="listeners" depends="uilistener,aircilistener" />

<!-- Prepares and builds the FlexUnit4UIRunner project -->
<target name="uilistener" depends="core,cilistener">
<target name="uilistener" depends="core,fluint,cilistener">
<ant dir="${uilistener.loc}" target="package" inheritall="false">
<propertyset>
<propertyref prefix="build" />
Expand All @@ -108,7 +119,7 @@ to contribute to our CI process.
</target>

<!-- Prepares and builds the Air CI Listener project -->
<target name="aircilistener" depends="core,cilistener">
<target name="aircilistener" depends="core,fluint,cilistener">
<ant dir="${aircilistener.loc}" target="package" inheritall="false">
<propertyset>
<propertyref prefix="build" />
Expand Down

0 comments on commit cdaddb1

Please sign in to comment.