My favorites | Sign in
Project Home Downloads Wiki Issues Source
Project Information
Members

This project contains a collection of Ant tasks which help you integrate haXe with Ant.

Tested and working on Ant 1.7.0, 1.7.1

Installation

To install anthx, use: haxelib install anthx

Declare anthx Tasks

To declare all anthx tasks within Ant so that you can use it in your Ant build files, place the following inside the project element of your Ant build file:

<taskdef resource="net/wildwinter/anthx/anthx.properties"
    classpath="pathToAntHX/libs/AntHX.jar"/>

Note the path to Ant HX This must be the path to AntHX in your haxelib folder. Type haxelib path anthx to retrieve this.

For example, on my install the declaration looks like this:

<taskdef resource="net/wildwinter/anthx/anthx.properties"
  classpath="E:\devtools\haxe-2.0-win\lib\anthx\0,7\libs\AntHX.jar"/>

Use

Once you have declared the tasks as above, you can use them like any other Ant task.

Tasks

  • haxeEnv - Set global haxe paths for all anthx tasks.
  • haxeEmbed - Executes haxe as script within an ant buildfile.
  • haxe - Generically call haxe.
  • neko - Run a neko file.
  • haxelib - Run haxelib.
  • getHaxelibPath - Return the path to a haxelib library.
  • haxe2neko - Compile .hx files to a Neko file.
  • haxe2swf - Compile .hx files to a Flash .swf file.
  • haxe2js - Compile .hx files to a Javascript file.
  • haxe2as3 - Compile .hx files to Actionscript 3 files.
  • haxe2php - Compile .hx files to PHP files.
  • haxe2cpp - Compile .hx files to C++ files.

Paths to haXe and neko

By default, the tasks here try to call haXe and neko within the current environment i.e. they assume that haXe and neko will run from the command line and all the appropriate environment variables are set.

You can override these using the haxeEnv task.

Changelog

Version 0.7

  • Added dependency checking (thanks to Gábor Szuromi) and forceRebuild/cacheFolder attributes.
  • Fixed  issue 1  (classpaths with spaces)
  • Added if= and unless= attributes to haxe-based tasks (again, thanks to Gábor).
  • Added haxe2cpp

Version 0.6

  • Fix to NEKOPATH when executing haxeEmbed

Version 0.5

  • Fix to getHaxelibPath (due to changes in haxelib)

Version 0.5

  • Fix to getHaxelibPath (due to changes in haxelib)

Version 0.4

  • Updated to be compatible with haXe 2.0
  • Added haxe2php

Version 0.3

  • Now includes haxeEnv, haxe, neko, haxelib, getHaxelibPath, haxe2neko, haxe2swf, haxe2js, haxe2as3
  • Renamed anthx task to haxeEmbed.
Powered by Google Project Hosting