Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Level 7

ANT Deployment Script

Please find below a little ANT build script to deploy your application to your local Roku box.
The actual deploy task requires a few 3rd party libraries as ANT provides no standard task for HTTP post.
I only tested this with a small sample application, but you might find it useful anyhow.


<project name="roku-test" default="deploy" basedir=".">
A simple ANT build file that bundles the source and images folders into a zip
and pushes it to your Roku (see for configuration).

<!-- deploy task requires fikin-ant tasks and dependent libraries -->
<taskdef name="httpmpost" classname="net.sf.fikin.ant.httpclientanttask.AntMultipartPostMethod">
<!-- requires the following JARs:
commons-codec-1.4.jar -->

<!-- set global properties for this build -->
<property name="source" location="source" />
<property name="images" location="images" />
<property name="build" location="target" />
<property name="dist" location="out" />
<property name="distfile" location="${dist}/${}.zip" />
<!-- load environment specific properties -->
<property file="" />

<target name="init">
<tstamp />

<!-- "compile" all resources, possibly do some filtering etc -->
<target name="compile" depends="init">
<mkdir dir="${build}" />
<copy todir="${build}/source">
<fileset dir="${source}" />
<copy todir="${build}/images">
<fileset dir="${images}" />

<target name="dist" depends="compile">
<mkdir dir="${dist}" />
<zip basedir="${build}" destfile="${distfile}" />

<target name="deploy" depends="dist">
<echo message="Deploying Application to Roku at http://${ROKU_DEV_TARGET}" />
<httpmpost url="http://${ROKU_DEV_TARGET}/plugin_install">
<postFile name="archive" file="${distfile}" />
<poststring name="mysubmit" value="Install" />

<target name="clean">
<delete dir="${build}" />
<delete dir="${dist}" />

# IP address of your Roku, see Settings->player info
0 Kudos