jayway/maven-android-plugin — pull request #270 by william-ferguson-au (2014-01-28 12:40:07+00:00)
Title: Issue 438 - adding Aar dep classes to compile classpath

NB the plugin is NOT WORKING as of this commit.

This commit introduces the AarMavenLifecycleParticipant which is invoked after the project is read but before any Mojos have been executed. It has been suggested by Igor that this is where we need to add the dependent Aar lib classes to the compile classpath. That means we need to extract the libs here and THEN add the Aar classes to the compile classpath. IMHO this is also where we should be adding any apklib sources to the compileSourceRoot too.
NB the AarMavenLifecycleParticipant actually works and successfully extracts the libs, nut doesn't add the classes to the compile classpath.

Also introduces the AarMavenLifecycleParticipantPlayground which is a testing ground for altering the compile classpath. It is currently failing because it is not being successfully injected with the

This commit also includes BuildHelper which does all the heavy lifting of extracting the libs into target\unpacked-libs. It was a necessary addition because we need this func in the MavenLifecycleParticipant, and this functionality was originally in ConsumeAarMojo and AbstractAndroidMojo. They both now delegate to the BuildHelper.

Final class is MavenDependencyInjector which is just a copy from Tycho of a class that Igor suggested should how to inject classes into the compile classpath. I have left it there as reference. It should be deleted before release.

What needs to be done is to get AarMavenLifecycleParticipantPlayground to alter the compile classpath. Once that is proven we should push that into the AarMavenLifecycleParticipant and remove AarMavenLifecycleParticipantPlayground. At that point ConsumeAarMojo becomes redundant.

I have also updated the libraryproject samples to provide good coverage across all the use cases we want to support.