summaryrefslogtreecommitdiffstats
path: root/core/static_java_library.mk
Commit message (Collapse)AuthorAgeFilesLines
* More flexibility to keep/remove R.class in static Java libraryYing Wang2012-06-191-7/+10
| | | | | | | | | | | | | | | | | | - Usually you don't need to set LOCAL_JAR_EXCLUDE_FILES in your Android.mk, if your static library is directly used by an app. - If your library will be included by another library that need reference the R/Manifest class, you can set LOCAL_JAR_EXCLUDE_FILES := none to keep the generated classes. - If your library includes another static library that has Android resource and you want to remove the generated classes carried by the static library, set: LOCAL_JAR_EXCLUDE_FILES := $(ANDROID_RESOURCE_GENERATED_CLASSES) With the LOCAL_JAR_EXCLUDE_FILES value "none", deprecate the old long variable LOCAL_KEEP_R_CLASS_IN_STATIC_JAVA_LIBRARY. Change-Id: I3b9ad5d66f0262f784feb09bc1537c5b01256258
* Support to build against prebuilt current SDK in unbundled branchYing Wang2012-05-101-1/+1
| | | | | | | | Bug: 6465084 With this change and prebuilt current SDK checked in, you can build unbundled apps with LOCAL_SDK_VERSION current in an unbundled branch. Change-Id: I4efcee611d08a3a903bd6bf5a80de11500564206
* Option to keep the generated R class in static Java libarryYing Wang2012-04-261-0/+2
| | | | | | | Bug: 6404748 Set LOCAL_KEEP_R_CLASS_IN_STATIC_JAVA_LIBRARY to true to do that. Change-Id: Ieee3cae431e3b1484ec598312729f2c871db2315
* Default LOCAL_SDK_RES_VERSION to LOCAL_SDK_VERSIONYing Wang2012-01-031-0/+5
| | | | | | in static_java_library.mk. Change-Id: I25ad47fea0fdb10c8aa0a0cb0d4c5ed117cd76ef
* Remove the R/Manifest classes when building the static Java libraryYing Wang2011-12-151-0/+8
| | | | | | | | | | | Bug: 5448433 Instead of deferring the removal to building the app. In that case any R/Manifest classes in any static Java libraries will be deleted, no matter if they are generated from Android resource, or just source R.java/Manifest.java in the source tree by accident. Change-Id: I656f45e3cbc3796c5d4832363231480b3f1dc5b8
* Support to build static Java library with Android resourceYing Wang2011-12-141-0/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: 5714516 The rationale behind this change: - the library is compiled into a jar file, but its R class is generated making the constant not constant (static, not final static) (aapt option --non-constant-id). Also the jar file does not contain the R class. - this allows the integer value to not be inlined in the compiled class files. Note that this prevents using switch statements. - the main project use this jar file as a normal static library: it will add all the class files except the R.class. - the main project uses the library res folder as a resource folder with lower priority than the main project (basically the main project is an overlay. This is accomplished using aapt's --auto-add-overlay to handle resources only in the main project (which the normal overlay mechanism doesn't allow). - the main project creates R classes in the main project's package but also in the library's package. This is done with aapt's --extra-packages which accept as many packages as needed, separated by a :. - manifest merging is not done yet, so activities/services/permissions/etc... have to be manually declared in the main app. To use a static library with Android resource in your app, 1. Add the library's resource dir to your app as an overlay: LOCAL_RESOURCE_DIR := <app_resource_dir> <static_library_resource_dirs> 2. Set the proper aapt flags: LOCAL_AAPT_FLAGS := <apps_own_flags> --auto-add-overlay \ --extra-packages <lib1_package_name>:<lib2_package_name>:... Change-Id: Ifb4d2300b952ea4aaee74da1bb0c6c72ea0698a3
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-031-0/+25
|
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-031-25/+0
|
* Initial ContributionThe Android Open Source Project2008-10-211-0/+25