スキップしてメイン コンテンツに移動

投稿

ラベル(ant)が付いた投稿を表示しています

Ant Build Script for ActionScript 3.0 (AIR Application)

This is my ant build script used for building app. You know FlashDevelop can build swf however it only compiles minimum classes directly used in the program. So I always run ant build script in order to compile all ".as" and ".mxml" source files If you would like to use my ant script, need some preparation.... Flex PMD: You can download Flex PMD, which is used in my ant script, from here . PMD xslt: I just downloaded official sourceforge PMD zip (the version is 5.0.0 when I wrote this article) and simply picked up some useful xslt from pmd-src-5.0.0/etc/xslt My project directory hierarchy is something like this... <?xml version="1.0" encoding="utf-8" ?> <project name="DukeSoftwareBuildAS3" default="all" basedir="."> <property name="root.dir" value=".." /> <property file="${root.dir}/proj.properties" /> <property file="build.prop

Get Useful SVN info in Ant

Hello there! I am trying to get svn info from Ant. I think there are two ways. SvnAnt Execute SVN command and extract information on Ant I've tried first option - SvnAnt but there is an issue for me. I need to pick up proper version of JavaHL based on Subversion client version installed on machine. Since I would like to shared the ant script between Windows and Linux box, it's a bit pain for me to switch the JavaHL in my Ant script. So I decided to go for second option. This method is really straight forward but a bit hack. The advantage of this method is it works at least svn command is available on your machine and it doesn't depend on svn client version. The disadvantage is it really depends on svn info output string e.g. it's design for human readability, not designed for API. Anyway, here is the example for getting svn revision and set it to build.current.revision property. What this target do is redirecting svn info output and extracting revision li

PMD and CPD for ECMAScript (Javascript)

Recently I have tried to use PMD and CPD for Javascript. I found that the offical PMD release says PMD 5.0.0 supports Javascript :D We have strong code inspection tools like Sonar etc. But I think still helpful for setting up compact ant task. PMD PMD ant task setup for javascript is easy, almost same as Java. Only you have to remember is including rhino jar in the classpath. Here is the example. <property name="buildscripts.path" location="${basedir}/generic-buildscripts"/> <property name="pmd.jar" value="pmd-5.0.0.jar"/> <property location="rhino-1.7R3.jar" name="rhino.jar"/> <path id="pmd.classpath"> <fileset dir="${buildscripts.path}/pmd/"> <include name="asm-3.2.jar"> <include name="jaxen-1.1.1.jar"> <include name="${pmd.jar}"> <include pa