What options do developers have for distributing their AIDL interfaces for other projects to use?
Personally, I like receiving my AIDL in the form of a candygram. :-)
So far, I have only been able to get a client project to work by copying the AIDL file from the service project into the client project.
AFAIK, AIDL has to be distributed in source form.
That works but it also means that clients (potentially at other companies) need to have my package structure and source in their codebase.
They only need your AIDL file(s) and knowledge of what Java package to put them in. This is part of your published API, no different than a URL and Web service definition is part of the API of a Web service.
They should not need your source code for anything else. If you elected to use custom Parcelable
classes in the AIDL-exposed methods, users of your AIDL would need compiled versions of those classes in a JAR, if not source. In addition, you need to arrange to have Red Bull (or the energy drink of your choice) available on tap for you and your staff, as dealing with version changes of AIDL is annoying enough, let alone version changes of client-side Parcelable
classes.
I have no yet experimented with publishing AIDL and code via an AAR-packaged Android library project via Gradle for Android. Once this works (which may or may not be "now"), it would at least allow you to bundle the AIDL and the related compiled Parcelable
code into a single artifact, which will help a bit with the versioning issue. OTOH, AAR packages right now can only be consumed by Gradle for Android (and I think the latest version of the Maven plugin), not Eclipse.