summaryrefslogtreecommitdiffstats
path: root/core/java_library.mk
Commit message (Collapse)AuthorAgeFilesLines
* build-with-colors: moar colorsChirayu Desai2015-10-061-3/+3
| | | | | | | | | | | | | | | | - rename CL_PFX and CL_INS to better match the colors they show. - add more colors. Output of: - most host stuff is yellow - most target stuff is green - installing/copying files is cyan - import/export includes and notice files is cyan - bootimage/recoveryimage is cyan - and some more colors in many places ;) Change-Id: I5532afa4ba608e0a7c408516dc9f912f9ca389f7
* Change built module of static java librariesYohann Roussel2015-02-181-2/+16
| | | | | | | | | Set LOCAL_BUILT_MODULE of static java libraries when Jack is enabled to classes.jack instead of javalib.jar. This allows that running mm in those libraries will build classes.jack instead of the jar. Change-Id: I96b4b227848e971df96331b3f0cc731e856be349
* Engage Jack incremental on demandYohann Roussel2015-02-041-2/+2
| | | | | | | | | | | Each module may engage Jack incremental with LOCAL_JACK_ENABLED := incremental Include renaming of LOCAL_USE_JACK to LOCAL_JACK_ENABLED that is now accepting 3 values "disabled", "full" and "incremental". Change-Id: Icbff275b397bee36b29312e821f3e8d45f83fbcc
* am 7c05897b: am e937ac81: Merge "Add new build flag LOCAL_DONT_DELETE_JAR_DIRS."Ying Wang2015-01-291-0/+1
|\ | | | | | | | | * commit '7c05897b69801e1945889a9b1a89b86bbbbbdd3a': Add new build flag LOCAL_DONT_DELETE_JAR_DIRS.
| * Add new build flag LOCAL_DONT_DELETE_JAR_DIRS.Fredrik Roubert2015-01-291-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Normally the build function initialize-package-file will delete all class files and all directory entries from JAR files, but sometimes external projects (eg. ICU4J) depend on having directory entries in their JAR files. This change adds the flag LOCAL_DONT_DELETE_JAR_DIRS (analogous to the flag LOCAL_DONT_DELETE_JAR_META_INF) which when set will skip deletion of directory entries in initialize-package-file. Change-Id: I4464b947b7528fca23925affa95e4071915f04d4
| * Running jarjar on Java resources.Ying Wang2015-01-211-8/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this change, Java resources are added as a separate step (add-java-resources-to-package) after dex is run, so jarjar isn't run on the resource files. With this change, we add Java resources immediately after we call javac, so jarjar is run on the resource files (the module's own resource, as well as resources carried by static Java libraries). When we generate the final apk/jar, we use the jarjar'ed jar as the inital pacakge file, with class files and empty folders removed. (cherry-picked from commit 140274707e31c9585aa28b0de2f1418c64ecd272) Bug: 18837479 Change-Id: I15ecf282bfb65fd53dd03fbd03dd4c71927c186a
* | Running jarjar on Java resources.Ying Wang2015-01-211-9/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this change, Java resources are added as a separate step (add-java-resources-to-package) after dex is run, so jarjar isn't run on the resource files. With this change, we add Java resources immediately after we call javac, so jarjar is run on the resource files (the module's own resource, as well as resources carried by static Java libraries). When we generate the final apk/jar, we use the jarjar'ed jar as the inital pacakge file, with class files and empty folders removed. When jack is enabled, in jack-java-to-dex we add the Java resources to a temp jar using the PRIVATE_EXTRA_JAR_ARGS, and extrac the files in a temp dir. Jack will process the resource files and output the result to PRIVATE_JACK_INTERMEDIATES_DIR. When we package the final apk/jar, we need to call add-carried-jack-resources to readd the resources. (TODO: if jack can output all resources to a jar/zip file, we can use that file as the initial package file as well.) Bug: 18837479 Change-Id: I8d7296e30ec8d005054cf04c4f2aed6d7a0d823b
* | Revert "Running jarjar on Java resources."Narayan Kamath2015-01-211-6/+9
| | | | | | | | | | | | | | | | This reverts commit 140274707e31c9585aa28b0de2f1418c64ecd272. Breaks the build on uiautomator_compat. Change-Id: I6d14f39e3432bf5e691027bbb8e7260e4bec8e8d
* | Running jarjar on Java resources.Ying Wang2015-01-201-9/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this change, Java resources are added as a separate step (add-java-resources-to-package) after dex is run, so jarjar isn't run on the resource files. With this change, we add Java resources immediately after we call javac, so jarjar is run on the resource files (the module's own resource, as well as resources carried by static Java libraries). When we generate the final apk/jar, we use the jarjar'ed jar as the inital pacakge file, with class files and empty folders removed. When jack is enabled, in jack-java-to-dex we add the Java resources to a temp jar using the PRIVATE_EXTRA_JAR_ARGS, and extrac the files in a temp dir. Jack will process the resource files and output the result to PRIVATE_JACK_INTERMEDIATES_DIR. When we package the final apk/jar, we need to call add-carried-jack-resources to readd the resources. (TODO: if jack can output all resources to a jar/zip file, we can use that file as the initial package file as well.) Bug: 18837479 Change-Id: I15ecf282bfb65fd53dd03fbd03dd4c71927c186a
* | am 912da645: am 73a730ca: Merge "Remove libdvm support from the core build ↵Ying Wang2014-12-161-6/+0
|\ \ | |/ | | | | | | | | | | system." * commit '912da64598a5175d6e5868c22977eda95f2a9df1': Remove libdvm support from the core build system.
| * Remove libdvm support from the core build system.Ying Wang2014-12-161-6/+0
| | | | | | | | | | | | | | | | | | Now libart is the only supported runtime and we don't need the build variables PRODUCT_RUNTIMES and DALVIK_VM_LIB. Bug: 18465297 Change-Id: Ibfda931cde0649163d79b584fb5ccad927a9bc2b
* | Compile using Jack.Yohann Roussel2014-12-021-0/+4
|/ | | | | | | | | | | | | | | | | | | | | | | | This allows to compile dex targeted java sources using Jack and Jill. Default is still to compile with the legacy toolchain. Default can be switched to the new toolchain by setting environement variable: export ANDROID_COMPILE_WITH_JACK=true Toolchain can also be forced for one module by defining LOCAL_USE_JACK:=true # false in the mk portion defining the module. Jack execution environement can be controlled with: Global variable ANDROID_JACK_VM allow to change the jvm executing Jack. Global variable ANDROID_JACK_VM_ARGS allows to change default args given to the jvm. Global variable ANDROID_JACK_EXTRA_ARGS allows to define some default args to give to Jack LOCAL_JACK_VM_ARGS allows to override default args given to the jvm for the module. LOCAL_JACK_EXTRA_ARGS allows to override default args passed to Jack. Change-Id: Ib81a0fd5f86a51d1e0edbb81cc791d828a05dd29
* Multilib support for odexYing Wang2014-05-181-8/+3
| | | | | | | | | | | | | If the VM is libart and DEXPREOPT is enabled, - For a Java library and the boot image, we build for both 1st arch and 2nd arch. - For an app, we build for the multilib arch the module is targeted for. The odex file will be in <arch_name>/<module_name>.odex inside the same dir where the jar/apk file gets installed. Nothing changed if it's built for libdvm. Bug: 14694978 Change-Id: I45118a83758b41d52d6c9e38f93f0ba2775a6c74
* Add DEXPREOPT support for ARTBrian Carlstrom2013-12-171-26/+13
| | | | Change-Id: I24d0d7b2a23a769f5d69bd4dc14be22e1475b759
* Enable art for user buildsBrian Carlstrom2013-09-191-1/+1
| | | | | Bug: 10069754 Change-Id: Iaaff33a97bd7b68b2e8d84cd0034b15dde8a4316
* Make it a fatal error if no source files for Java module.Ying Wang2013-08-281-3/+2
| | | | Change-Id: Ia04158c11381b6b1687b9d5c699a9ea8ae3cb317
* Allow to run Proguard on static Java libraryYing Wang2013-03-261-1/+10
| | | | | | | | 1. Let aapt output the proguard_options file 2. If proguard is enabled, switch the dependency from $(full_classes_jar) to $(full_classes_proguard_jar). Change-Id: Idc641a1515b8899a4623a2aeec5cd494f6c1c1c5
* Add LOCAL_APK_LIBRARIES argument.Dianne Hackborn2013-03-121-0/+2
| | | | | | | | | | | | | | This allows you to build apks that link against other apks using the framework's new shared library apk feature. Also if you are using LOCAL_APK_LIBRARIES, then LOCAL_DEX_PREOPT will not be allowed. This is because using preopt means the apk is stripped of its dex file, so the pre-installed apk can't be redexed if its associated library changes. (Even if the build system didn't strip the dex, Dalvik still has issues because it assumes a pre-odex file is always valid.) Change-Id: I952c0d24f8975f75aff67f78b5faeec91144c3e7
* Build libcore without a dep on aapt.-b master2013-01-281-2/+2
| | | | | | | | | | | | | Currently building libcore (i.e. to get the core Java libraries) has a dependency on AAPT. This is problematic for some users that don't want to pull in the entirety of frameworks/base, e.g. for Dalvik development. It turns out that all definitions.mk is using aapt for in this case is 'aapt add -k <jar> <dex>', which adds a file to a JAR while stripping path info. This is functionally equivalent to 'zip -j', and this CL just makes that switch. Change-Id: I292ecaf9d0321018bb7d2e68a49b2cc81de98a20
* am d19511a6: am c3a4cfe9: Merge "Support EMMA_INSTRUMENT in both full and ↵Ying Wang2012-08-221-0/+10
|\ | | | | | | | | | | | | unbundled builds." into jb-mr1-dev * commit 'd19511a6657efc7f1a7e544df04f076223f8fe65': Support EMMA_INSTRUMENT in both full and unbundled builds.
| * Support EMMA_INSTRUMENT in both full and unbundled builds.Ying Wang2012-08-221-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: 6987838 - With this change, use "EMMA_INSTRUMENT=true" to enable emma in full or unbundled build. - You don't need to add "LOCAL_STATIC_JAVA_LIBRARIES += emma" any more for unbundled apps. - Now a single var LOCAL_EMMA_INSTRUMENT replaces the previous LOCAL_NO_EMMA_INSTRUMENT and LOCAL_NO_EMMA_COMPILE. - By default, if EMMA_INSTRUMENT is true, emma is enabled for only non-test apps. - A new global var EMMA_INSTRUMENT_STATIC. It enables EMMA_INSTRUMENT and builds emma into apk/jar as static library, instead of using emma as part of shared library core.jar. Change-Id: I0aa219e83074879ececc159b5b07c39eb07ccc00
* | Automatically add Java resources carried by static Java libraries.Ying Wang2012-08-091-0/+1
|/ | | | | Bug: 6892294 Change-Id: I3ff71ee3d7b9ccdfde6a5284cc350864fbffa71f
* am 0187511e: am 4243532d: am 301843ae: am 29e44b7a: Merge "Fix for "dexopt: ↵Ying Wang2012-03-201-0/+1
|\ | | | | | | | | | | | | No such file or directory" error" * commit '0187511e70960618ac5c84f1446ec955ba6c8955': Fix for "dexopt: No such file or directory" error
| * Fix for "dexopt: No such file or directory" errorHaruyasu Ishida2012-01-271-0/+1
| | | | | | | | | | | | | | | | | | | | When common_javalib.jar is created, both LOCAL_BUILT_MODULE and built_odex targets can be run. If built_odex target runs before the directory is created by LOCAL_BUILT_MODULE target, the error occurs. Change-Id: I1ebcb27630f8373558da6acdfce95f5cdf714bbf
* | Support to build static Java library with Android resourceYing Wang2011-12-141-0/+2
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* new LOCAL_DEX_PREOPT option "nostripping"Ying Wang2011-10-241-2/+9
| | | | | | | | Set "LOCAL_DEX_PREOPT := nostripping" to do dex-preopt while not strip the classes.dex. Bug: 5396625 5502338 Change-Id: Ie8dea4414ebeefeae89c6433b246faea27baa5e7
* Tracking merge of dalvik-dev to masterBrian Carlstrom2011-04-011-2/+5
| | | | | | | | | | | | git cherry-pick --no-commit 5fac8d8f7096d8a950acad1ad0a8b963cef72e03 git cherry-pick --no-commit 1a8210710b46a0796ff2f8e76b6beb3a54f89019 git cherry-pick --no-commit 4fe2ac9f7284b838393aec8f0f48caef2510fd46 git cherry-pick --no-commit 7beb710a8f976fc4cb1e8be780644386870c4975 Change-Id: Ib10348e5509c906c6b95fa4accd6a18900bfe748
* Disable dexpreopt for unbundled build.Ying Wang2011-01-121-0/+2
| | | | Change-Id: Iad0cc41cfad2533703a0dddad743720c43ddb667
* Move odex related files to product-specific dir.Ying Wang2010-10-011-21/+16
| | | | | | | | | | | For target Java libraries, now the LOCAL_BUILT_MODULE includes both javalib.jar and the .odex file, if dexpreopt is enabled. These 2 files are moved to a product-specific dir in this change. For target Java Libraries, $(intermediates) now points to the product-specific dir. There is still a javalib.jar in the $(intermediates.COMMON) dir, which is used as dependency. Nothing is changed for host Java libraries. Change-Id: I2546dbb940c74537864ca002d1acb49bb731fbbc
* Set the intermediate dirs before using them.Ying Wang2010-09-271-0/+3
| | | | Change-Id: Ibdab1234ca8c5a86c5226ed71e84374c3fcd7a90
* Add javalib.dex.jar to LOCAL_INTERMEDIATE_TARGETSYing Wang2010-09-271-1/+3
| | | | | | So the its target-specific PRIVATE vars can be set properly. Change-Id: I83b60bd56ee8523b0ba97092010c76c270b60c02
* Integrate dexpreopt into the build system.Ying Wang2010-09-221-1/+50
| | | | Change-Id: Id67f85d0f5c8674f5bc22e431114ca73625811ef
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-031-0/+47
|
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-031-47/+0
|
* Initial ContributionThe Android Open Source Project2008-10-211-0/+47