I am building some components into an AOSP build and I would like them to
share some Java code. Currently, I am adding two pieces:
1. System APK (for some new services)
2. Java library for host machines (client to interact with those
services from apps)
There is some common code between the two that I would like to put in a
shared "common" module, but I can't figure out the best way to include it?
My first inclination was to do the following for each:
1. Common = BUILD_STATIC_JAVA_LIBRARY
2. Client Library = BUILD_HOST_JAVA_LIBRARY
1. Includes the common under LOCAL_STATIC_JAVA_LIBRARIES
3. APK = BUILD_PACKAGE
1. Includes the common under LOCAL_STATIC_JAVA_LIBRARIES
The problem that I ran into is that BUILD_STATIC_JAVA_LIBRARY doesn't seem
to feed nicely into BUILD_HOST_JAVA_LIBRARY as a dependency. It claims "no
rule to make target" since javalib.jar doesn't exist for common (it builds
a classes.jack file instead). If I change BUILD_HOST_JAVA_LIBRARY into
BUILD_STATIC_JAVA_LIBRARY, everything compiles but I have no viable product
in out/ that I can distribute (the code stays as classes.jack in
intermediates).
Another idea I had was to change BUILD_STATIC_JAVA_LIBRARY into
BUILD_JAVA_LIBRARY. However, I don't want the common code to be copied onto
the target (no reason since it's built into the System APK as well).
Can anyone advise me on a proper technique for building the common code
module that can be included by both an APK package and host library? Or
perhaps a better way to deploy
Cheers,
--
Dave Smith, PE
@devunwired
--
--
You received this message because you are subscribed to the "Android Building"
mailing list.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en
---
You received this message because you are subscribed to the Google Groups
"Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.