-
Notifications
You must be signed in to change notification settings - Fork 0
InstallingEnvironment
Developing an AnnotationProcessor is not something very common, but hopefully we went through many different bugs and solved them. We now have a quite stable and clean dev environment, so you should be able to contribute to AndroidAnnotations by following these simple steps.
- Install Git
- Install Maven
- Install Eclipse Juno
- Install the latest version of the Android SDK and the Android Eclipse Plugin (ADT)
- Install the latest version of the m2e-android and m2e plugins:
- Start Eclipse, then select Help > Install New Software.
- Click Add, in the top-right corner.
- In the Add Repository dialog that appears, enter "m2e-android" for the Name and the following URL for the Location:
http://rgladwell.github.com/m2e-android/updates/ - In the Available Software dialog, select the checkbox next to Android Connector for M2E and click Next.
- In the next window, you'll see a list of the tools to be downloaded. Click Next.
- Read and accept the license agreements, then click Finish. If you get a security warning saying that the authenticity or validity of the software can't be established, click OK.
- When the installation completes, restart Eclipse.
- Fork the repository
- Clone the repository to your computer:
git clone git@github.com:YOUR_USERNAME/androidannotations.git-
Go to File > Import > General > Existing Projects into Workspace, click Browse, select the androidannotations-dependencies folder and click Open. Click Finish.
-
Go to File > Import > Maven > Existing Maven Projects, click Browse, select the AndroidAnnotations folder and click Open then uncheck the last two to keep only
/pom.xmlandandroidannotations/pom.xmlchecked. Click Finish. -
In the androidannotations project, open the
src/mainfolder, right click on eclipse and select Build Path > Use as source folder. -
Right click on the androidannotations project, select Build Path > Add Libraries.... Select Plug-in Dependencies, select org.eclipse.core.runtime_XXX.jar and click Finish.
-
Go to Run > Run Configurations... and double click on Eclipse Application, and click Run.
Note : I encountered a problem with running Eclipse on a 32bits JVM with a 64bits Mac, which was simply solved by adding -D32 to the VM arguments of the run configuration.
- This new eclipse is launched on a new workspace.
- Go to File > Import > Maven > Existing Maven Projects, click Browse, select the AndroidAnnotations/functional-test-1-5 folder and click Open and then Finish.
- The generated classes are not there yet, so do a Project > Clean... to let AndroidAnnotations generate them.
- If you still have compilation errors on a project, claiming that the generated classes are missing, open the project Properties > Java compiler > Annotation Processing and change the name of the Generated source directory. Click Apply, then change it back to .apt_generated and apply again. You should be good to go, if not, then let us know ;-) .
- Select the functional-test-1-5 then click on Run > Run Configurations... and double click on JUnit. Change the test runner to JUnit4. In the bottom part, select the Eclipse JUnit Runner.
- Go to Classpath and click Advanced on the right. Select Add Folders, and select functional-test-1-5 > target > android-classes. Also add the folder functional-test-1-5 > bin > classes
Notes:
To start the tests, just run the previously created Run Configuration
You can start the "Eclipse application" in debug mode, and put breakpoints in your code. You will also benefit from hot replace of code (only inside methods)
To see your changes in the code, you have to restart the 2nd eclipse. We didn't find any better solution, but tell us if you do!
AndroidAnnotations was created by Pierre-Yves Ricau and is sponsored by eBusinessInformations.
04/11/2012 The 2.7 release is out
- Get started!
- Download
- Cookbook, full of recipes
- List of all available annotations
- Release Notes
- Examples
- Read the FAQ
- Join the Mailing list
- Create an issue
- Tag on Stack Overflow