Skip to content

Latest commit

 

History

History

app

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
# Local Setup

Some elements of your environment will need to be configured locally for some features.

## A) Google Maps API Keys

You can load a debug API key for google maps into the application for testing using the maps_api_key_debug resource.

A convenient way to do so is to copy the 

external_strings_dev.xml.template

file in the res\values directory to the file location

external_strings_dev.xml

and place your debug API key into the string definition there.

## B) Ant Builds

### Local Config Setups

All .template files are read locally automatically if they are copied at ".template" is removed.

local.properties.template contains the relevant properties that should be set to prepare a local build with
ANT

key.properties.template contains the properties to point ANT to a keystore file and configure it for signing
produced builds. You'll need to configure the "local.properties" (or wherever your properties are coming for) 
to actually create that link as outlined

To direct the library builds (mapviewballoons) you may need to drop a "local.properties" file
into their root directories which contains the 'sdk.dir' property. Alternatively the sdk directory can be included
as an envvar.  

### Running builds

Run "clean", then you can run cc-release. 

Note: Running ANT builds may interfere with your IDE, so it's often a good idea to 'clean' after an ANT build

## Test Framework Setup

We use the Robolectric (currently still the 2.n release) framework to provide the harnessing needed to
both build and run Android-Context unit tests, and build an environment for mocked or near-mocked tests.

The tests can either be run direct in an IDE (Currently Eclipse is the only supported) environment or
can be run direct from ANT.  

### IDE Configuration 

Set the ANDROID_HOME var on the unit tests to the appropriate SDK target's "android.jar" path.

Run tests as usual using JUnit4's build runner. 

### Using ANT

Configure ANT as described in the build setup.

Run the targets: clean and then unit-test. The 'generate-report' target will produce an HTML report from
the unit tests that have already been run.