How do I build my project with ANT when it depends on a non-library project with an Android library project dependency?

Go To StackoverFlow.com

0

I'm trying to build my project using ANT. My project uses ActionbarSherlock, and Roboguice-Sherlock. ActionbarSherlock is an Android library project, but Roboguice-Sherlock is not. It's not even an Android project at all. See here:

https://github.com/rtyley/roboguice-sherlock

I can get ActionbarSherlock to build using ANT no problem, the problem lies with Roboguice-Sherlock. It's not an Android project, yet it has dependencies on Android and ActionbarSherlock, as well as Roboguice. When I try to build I get a ton of errors saying it can't find the Roboguice-Sherlock stuff.

2012-04-04 03:57
by Christopher Perry


1

If your project has the Roboguice .jar and the library project reference to ActionBarSherlock already configured you should be able to just drop it into your libs/ folder to have it automatically picked up.

I am working with Roberto to ensure that the .jar of his project gets uploaded to GitHub for non-Maven users to use.

For now, you can clone the project simply run mvn clean package to get a standalone .jar in the target/ folder which will enable you to do as I described above.

2012-04-04 04:08
by Jake Wharton
Hmmm... I had added it [roboguice-sherlock] as a submodule in the hopes that I might pick up any bug fixes easily in the future - Christopher Perry 2012-04-04 04:11
There is a maven task/script/thingy where you can grab the .jar directly from Maven Central which will allow for easy upgrades. You may want to use that then. (I think you just call Ivy - Jake Wharton 2012-04-04 04:14


1

You need to add robiguice-sherlock as a .jar to your Android project. You can download it here (click Download (JAR)). Trying to build the source in Android will fail because it is not an Android project. Once it is in your directory, you need to open project properties and add the .jar to your build path.

2012-04-04 04:11
by Phil
Ads