Thursday, August 11, 2011

Ant script for j2me projects

<?xml version="1.0" encoding="UTF-8"?>


<project name="Test Runner" default="build">

<property name="wtk.home" value="C:/WTK2.5.2_01"/>
<property name="polish.home" location="C:/Program Files/J2ME-Polish" />
<property name="polish.vendor" value="chathuranga"/>
<property name="polish.name" value="pibt"/>
<property name="resource" value="C:/Documents and Settings/Administrator/scm/AbansSCM/resources"/>
<property name="polish.MenuBar.useExtendedMenuBar" value="true" />
   
<taskdef name="j2mepolish"
classname="de.enough.polish.ant.PolishTask"

classpath="${polish.home}/bin/classes:${polish.home}/lib/enough-j2mepolish-build.jar:${polish.home}/lib/jdom.jar"/>


<target name="build">


<j2mepolish>
<info

name="Test Runner"
version="13.0.0"
vendorName="chathuranga"
description="my final year project for Bsc degree in computing "
jarName="${polish.vendor}-${polish.name}-example.jar"
jarUrl="${polish.jarName}"
permissions="javax.microedition.io.Connector.http">
   
</info>
   
   
<deviceRequirements>
<requirement name="Identifier" value="Generic/AnyPhone"/>
</deviceRequirements>

<build resDir="${resource}"

fullscreen="menu"
usePolishGui="true">

<midlet class="MenuMidlet" name="Test Runner"/>
   
</build>

</j2mepolish>

   
</target>


<target name="clean" >
<delete dir="build"/>
<delete file="${polish.vendor}-${polish.name}-example.jar"/>
<delete file="${polish.vendor}-${polish.name}-example.jad"/>
<delete file="${polish.jarName}"/>

</target>

<target name="rebuild" depends ="clean,build">
</target>


<target name="run">
   
<exec executable="${wtk.home}/bin/emulator">
<arg line="-Xdescriptor:dist/${polish.vendor}-${polish.name}-example.jad"/>
</exec>
</target>


</project>

No comments:

Post a Comment