Esri / squad-leader-android

The Squad Leader template demonstrates best practices for building handheld military applications with ArcGIS.
Apache License 2.0
13 stars 16 forks source link

Add automated build with ant #58

Open csmoore opened 10 years ago

csmoore commented 10 years ago

This is needed in order to add this repo to our nightly builds. We will need ant build/build steps added to the readme (this is similar to the Android doc that gives Eclipse and Ant examples).

Here were the changes I had to make to the project to get ant working:

  1. Use this command to update an android eclipse project to use ant android update project --path . (this creates a build.xml file)
  2. Had to create build.xml files for dependent projects (aFileChooser, appcompat7) & squadleader using the above commands
  3. Had to add step to copy Runtime jars to /libs folder (The android ant file is so complex I couldn't figure out how to add these to the classpath)
  4. Had to Copy MilitaryAppsLibrary under SquadLeader\src\ folder in order to get these to build with ant as part of squad leader

This is the file that needs added to do steps 3&4

source/SquadLeader/custom_rules.xml :

<?xml version="1.0" encoding="UTF-8"?>
<project name="custom_rules">
 <property name="dir.arcgis.jars" value="C:/Installs/arcgis-android-sdk-v10.2/libs"/>  
    <target name="-pre-build">
    <copy todir="./libs">
      <fileset dir="${dir.arcgis.jars}" />
    </copy>
    <copy todir="./src/com/esri/militaryapps">
      <fileset dir="../../military-apps-library-java/source/MilitaryAppsLibrary/src/com/esri/militaryapps" />
    </copy>
    </target>
</project>
garysheppardjr commented 10 years ago

Since we don't own the code for aFileChooser or appcompat, we need to think of how we will implement the build file for those submodules. The aFileChooser guy accepted a pull request from me and might accept another to add a build.xml file. But appcompat is from the Android SDK, not GitHub. I'm not sure of the best way to do a build.xml for code that comes installed on the developer's system. Any thoughts would be appreciated.

garysheppardjr commented 10 years ago

If and when we resolve this, we should document it in README.md as part of resolving it.

csmoore commented 10 years ago

For those 3rd party dependencies, I was just thinking just adding a manual step to create the build.xml with android update project --path .

csmoore commented 10 years ago

Assigning to me to do/document during review/release

csmoore commented 10 years ago

This will get verified when build is added to Jenkins so assigning to @ACueva to close when verified.

csmoore commented 10 years ago

@ACueva just checking back to see if a task got entered in Planbox to set up an auto-build for this

joebayles commented 10 years ago

@ACueva Any luck?

csmoore commented 10 years ago

Moving this to unassigned and wont fix because of problems getting this to work reliably, some more notes on this here: https://github.com/Esri/squad-leader-android/issues/27#issuecomment-38213846

jrweakland commented 9 years ago

Backlog item - https://app.asana.com/0/23019535413944/23192032216705