jbrains/TrackEveryPenny — pull request #1 by blundell (2012-12-26 02:27:21+00:00)
Title: Got running in eclipse

I've got the project running in Eclipse, just updated the Git Ignore file to ignore eclipse stuff.

Below is outlined the steps to get it up an running in Eclipse, you might want to put this on a wiki page and link it from the readme.

(There are other ways to do this, this is one)

When you've finished your Eclipse should look like this:

![Screen Shot 2012-12-26 at 01 45 29](https://f.cloud.github.com/assets/655860/30686/049c9506-4eff-11e2-8725-874307ff721c.png)

- clone the repo

**1** In Eclipse Package Explorer
- Right Click > New > Java Project
- Project Name: TrackEveryPenny_core
- Tick 'Add to working sets'
- Hit 'Select' > 'New'
- Pick Java > Next
- Name it 'TrackEveryPenny'
- Hit 'Finish'
- Hit 'Finish' again
- Right Click on the newly created project > Java Build Path
- Pick 'Source' Tab
- Hit ' Link Source' > 'Browse'
- In your cloned TrackEveryPenny Git Repo select 'AndroidFree/src/main/java' > Open > Finish > Ok

You can now view the core java code from this project

**2** In Eclipse Package Explorer
- Right Click > New > Java Project
- Project Name: TrackEveryPenny_core_tests
- Tick 'Add to working sets'
- From the dropdown select 'TrackEveryPenny'
- Hit 'Finish'
- Right Click on the newly created project > Java Build Path
- Pick 'Source' Tab
- Hit ' Link Source' > 'Browse'
- In your cloned TrackEveryPenny Git Repo select 'AndroidFree/src/test/java' > Open > Finish
- Pick 'Projects' Tab
- Hit 'Add'
- Select the 'TrackEveryPenny_core' project > Ok
- Pick 'Libraries' Tab
- Hit 'Add External Jars'
- Navigate to your cloned TrackEveryPenny Git Repo 'AndroidFree/src/libs/test' and select ALL the jars > Open - Ok

You can now run the Unit Tests on the core java code from this project

**3** In Eclipse Package Explorer
- Right Click > Import > Existing Android Code into Workspace
- Navigate to your cloned TrackEveryPenny Git Repo > Open
- Tick 'Add to working sets'
- From the dropdown select 'TrackEveryPenny'
- Hit 'Finish'
- Right Click on the newly created project > Java Build Path
- Pick 'Source' Tab
- Hit ' Link Source' > 'Browse'
- In your cloned TrackEveryPenny Git Repo select 'AndroidFree/src/main/java' > Open > Finish
- Hit ' Link Source' > 'Browse' (Again)
- In your cloned TrackEveryPenny Git Repo select 'src/main/java' > Open > Finish
- Pick 'Libraries' Tab
- Hit 'Add External Jars'
- Navigate to your cloned TrackEveryPenny Git Repo 'src/libs/main' and select ALL the jars > Open > Ok

You can now run the app from this project

**4** In Eclipse Package Explorer
- Right Click > New > Java Project
- Project Name: TrackEveryPenny_tests
- Tick 'Add to working sets'
- From the dropdown select 'TrackEveryPenny'
- Hit 'Finish'
- Right Click on the newly created project > Java Build Path
- Pick 'Source' Tab
- Hit ' Link Source' > 'Browse'
- In your cloned TrackEveryPenny Git Repo select 'src/test/java' > Open > Finish
- Pick 'Projects' Tab
- Hit 'Add'
- Select the 'TrackEveryPenny' project > Ok
- Hit 'Add' (again)
- Select the 'TrackEveryPenny_core_tests' project > Ok
- Pick 'Libraries' Tab
- Hit 'Add External Jars'
- Navigate to your cloned TrackEveryPenny Git Repo 'src/libs/test' and select ALL the jars > Open
- Hit 'Add External Jars' (again)
- Navigate to /platforms/android-8/android.jar
- Click “Open” (keep the Properties dialog for MyProjectTest open)
- Hit 'Add External Jars' (again)
- Navigate to /add-ons/addon_google_apis_google_inc_8/libs/maps.jar
Click “Open”
- Pick 'Order & Export' tab
- Move the robolectric jar to above the android.jar and maps.jar
- Ok

You can now run the unit tests on the mainandroid app with this project