Skip to content

Commit

Permalink
Change anchor tasks to extension points
Browse files Browse the repository at this point in the history
  • Loading branch information
nschonni committed Nov 3, 2012
1 parent 0b42bfe commit a9bacc0
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 19 deletions.
10 changes: 6 additions & 4 deletions build/build-tasks.xml
Expand Up @@ -17,9 +17,7 @@
<classpath refid="antcontrib.classpath" />
</taskdef>

<target name="-init" depends="-build-jruby">
<mkdir dir="${build.dir}"/>
</target>
<extension-point name="-init"/>

<!-- yui-compressor task definition -->
<path id="yui.classpath">
Expand Down Expand Up @@ -53,7 +51,7 @@
</path>

<!-- Include jruby + gems (compass + sass) -->
<target name="-build-jruby" depends="-jruby.jar.check" unless="jruby.jar.exists">
<target name="-build-jruby" extensionOf="-init" depends="-jruby.jar.check" unless="jruby.jar.exists">
<mkdir dir="${lib.dir}/jruby-compiled" />
<delete dir="${lib.dir}/vendors-${jruby.depends}" />
<get src="http://jruby.org.s3.amazonaws.com/downloads/${jruby.version}/jruby-complete-${jruby.version}.jar" dest="${lib.dir}/jruby-complete-${jruby.version}.jar" skipexisting="true"/>
Expand Down Expand Up @@ -120,4 +118,8 @@
<delete dir="${build.dir}" />
<delete dir="${dist.dir}" />
</target>

<extension-point name="build" depends="-init" />

<extension-point name="test" />
</project>
4 changes: 0 additions & 4 deletions src/base/build.xml
Expand Up @@ -7,8 +7,4 @@

<target name="default" depends="clean,build" description="Performs a clean and build when calling ant without any target"></target>

<target name="build" />

<target name="test" description="Placeholder for future test tasks"/>

</project>
2 changes: 0 additions & 2 deletions src/grids/build.xml
Expand Up @@ -41,6 +41,4 @@
</filterchain>
</copy>
</target>

<target name="test" description="Placeholder for future test tasks"/>
</project>
4 changes: 1 addition & 3 deletions src/js/build.xml
Expand Up @@ -152,10 +152,8 @@
<delete dir="${build.dir}" />
<delete dir="${dist.dir}" />
</target>

<target name="test" depends="-jshint"/>

<target name="-jshint">
<target name="-jshint" extensionOf="test">
<jshint dir="${src.dir}" fail="${jshint.failbuild}" globalsFile="${jshint.globals.file}" options="strict:false">
<report type="xml" destfile="${build.dir}/jshint.out.xml" />
<include name="**/*.js"/>
Expand Down
2 changes: 1 addition & 1 deletion src/theme-clf2-nsi2/build.xml
Expand Up @@ -73,5 +73,5 @@
</copy>
</target>

<target name="test" depends="-jshint"/>
<target name="lint" extensionOf="test" depends="-jshint"/>
</project>
2 changes: 1 addition & 1 deletion src/theme-gcwu-fegc/build.xml
Expand Up @@ -102,5 +102,5 @@
</copy>
</target>

<target name="test" depends="-jshint"/>
<target name="lint" extensionOf="test" depends="-jshint"/>
</project>
6 changes: 2 additions & 4 deletions src/theme-gcwu-intranet/build.xml
Expand Up @@ -7,9 +7,7 @@

<target name="default" depends="clean,build" description="Performs a clean and build when calling ant without any target"></target>

<target name="build" depends="-init, -minify" />

<target name="-minify" depends="-merge-css, -base64-encode">
<target name="-minify" extensionOf="build" depends="-merge-css, -base64-encode">
<copy todir="${build.dir}/js">
<fileset dir="${src.dir}/js"/>
<filterchain>
Expand Down Expand Up @@ -103,5 +101,5 @@
</copy>
</target>

<target name="test" depends="-jshint"/>
<target name="lint" extensionOf="test" depends="-jshint"/>
</project>

0 comments on commit a9bacc0

Please sign in to comment.