Commit graph

221 commits

Author SHA1 Message Date
Dario Freni
716e9b686c Run appcompat on vendor and product-services.
Also add some more relevant information at the beginning of each report,
to make triaging of the reports easier.

To test this I declared ExactCalculator as
LOCAL_PRODUCT_SERVICES_MODULE, and this is the resulting log:

"""
Package name: com.android.calculator2
Module name in Android tree: ExactCalculator
Local path in Android tree: packages/apps/ExactCalculator
Install path on aosp_marlin-eng: out/target/product/marlin/system/product-services/app/ExactCalculator/ExactCalculator.apk

appcompat.sh output:
NOTE: appcompat.sh is still under development. It can report
API uses that do not execute at runtime, and reflection uses
that do not exist. It can also miss on reflection uses.
1: Reflection light greylist Landroid/os/Bundle;->getIBinder use(s):
       Landroid/support/v4/app/BundleCompat$BundleCompatBaseImpl;->getBinder(Landroid/os/Bundle;Ljava/lang/String;)Landroid/os/IBinder;

2: Reflection light greylist Landroid/view/View;->mAccessibilityDelegate use(s):
       Landroid/support/v4/view/ViewCompat$ViewCompatBaseImpl;->hasAccessibilityDelegate(Landroid/view/View;)Z

3: Reflection light greylist Landroid/view/View;->mMinHeight use(s):
       Landroid/support/v4/view/ViewCompat$ViewCompatBaseImpl;->getMinimumHeight(Landroid/view/View;)I

4: Reflection light greylist Landroid/view/View;->mMinWidth use(s):
       Landroid/support/v4/view/ViewCompat$ViewCompatBaseImpl;->getMinimumWidth(Landroid/view/View;)I

4 hidden API(s) used: 0 linked against, 4 through reflection
       0 in blacklist
       0 in dark greylist
       4 in light greylist
To run an analysis that can give more reflection accesses,
but could include false positives, pass the --imprecise flag.
"""

Test: m (also on internal)
Bug: 110073830
Change-Id: I5114f51d1ab163e954fcffb159ef335abc289cf6
2018-08-01 00:22:08 +01:00
David Brazdil
825770ebad Do not run veridex on unbundled app builds
Unbundled app builds do not build the framework, only apps against
the prebuilt public API. Running veridex from the local tree does,
however, depend on the framework to generate the list of non-SDK
APIs. Disable veridex on such builds and remove appcompat.zip from
artifacts.

Test: make ANDROID_BUILDSPEC=vendor/google/build/app_build_spec.mk
Change-Id: I16289adc7fc660109d61260e8a49e992228e727c
2018-07-31 15:15:27 +01:00
Dario Freni
3cf03b775a Merge "Add support for /product-services partition" 2018-07-20 09:00:25 +00:00
Dario Freni
5f681e1dd7 Add support for /product-services partition
This CL is largely an adaptation of Change-Id
I774e6a38003734421591e51bed103802ff84f432

It adds the following variables:

- BOARD_AVB_PRODUCT_SERVICES_KEY_PATH
- BOARD_AVB_PRODUCT_SERVICES_ALGORITHM
- BOARD_AVB_PRODUCT_SERVICES_ROLLBACK_INDEX_LOCATION
- BOARD_PRODUCT_SERVICESIMAGE_FILE_SYSTEM_TYPE
- BOARD_PRODUCT_SERVICESIMAGE_EXTFS_INODE_COUNT
- BOARD_PRODUCT_SERVICESIMAGE_EXTFS_RSV_PCT
- BOARD_PRODUCT_SERVICESIMAGE_PARTITION_SIZE
- BOARD_PRODUCT_SERVICESIMAGE_JOURNAL_SIZE
- BOARD_PRODUCT_SERVICESIMAGE_SQUASHFS_BLOCK_SIZE
- BOARD_PRODUCT_SERVICESIMAGE_SQUASHFS_COMPRESSOR
- BOARD_PRODUCT_SERVICESIMAGE_SQUASHFS_COMPRESSOR_OPT
- BOARD_PRODUCT_SERVICESIMAGE_SQUASHFS_DISABLE_4K_ALIGN
- BOARD_PREBUILT_PRODUCT_SERVICESIMAGE
- BOARD_USES_PRODUCT_SERVICESIMAGE
- LOCAL_PRODUCT_SERVICES_MODULE
- PRODUCT_PRODUCT_SERVICES_BASE_FS_PATH
- PRODUCT_PRODUCT_SERVICES_VERITY_PARTITION
- PRODUCT_PRODUCT_SERVICES_PROPERTIES
- TARGET_COPY_OUT_PRODUCT_SERVICES
- TARGET_OUT_PRODUCT_SERVICES
- TARGET_OUT_PRODUCT_SERVICES_*

Bug: 80741439
Test: Successfully built product-services.img with one module in it, and flashed
on device. Also successfully built image with /system/product-services directory
and no /product-services partition.
Change-Id: I5d229f6ac729ea6df9ff1f14cee2e28972cd9b4d
2018-07-19 11:15:11 +01:00
Dario Freni
1ecc925995 Run appcompat on all /product modules.
The output of the appcompat tool is store on $(PRODUCT_OUT)/appcompat.

Bug: 110073830
Bug: 78924201
Test: m
Change-Id: Ia77cc53fc241a048958cf243ba298298f800f933
2018-07-18 12:18:49 +01:00
Colin Cross
71c5b95aa6 Support LOCAL_STATIC_JAVA_AAR_LIBRARIES with aapt2
LOCAL_STATIC_JAVA_AAR_LIBRARIES are slightly different from
LOCAL_STATIC_ANDROID_LIBRARIES, due to b/78447299 the
AndroidManifest.xml from ANDROID libraries are ignored.
Temporarily add support for LOCAL_STATIC_JAVA_AAR_LIBRARIES
when using LOCAL_USE_AAPT2 := true, treating them the same
as LOCAL_STATIC_ANDROID_LIBRARIES except that they are
merged by android_manifest.xml

Bug: 78447299
Bug: 79481102
Test: m FORCE_AAPT2=true checkbuild
Change-Id: Ia6210810c1ea6e776be97ae1c9a586b5de844125
2018-05-23 13:39:15 -07:00
Colin Cross
7bc6cab12e Move support library dependency munging earlier
The presence of LOCAL_STATIC_ANDROID_LIBRARIES is used early to
decide whether to move resources to overlays, and late to decide
whether to add --auto-add-overlay.  If support_libraries.mk moves
the last LOCAL_STATIC_ANDROID_LIBRARIES value to
LOCAL_STATIC_JAVA_LIBRARIES then the resources will be moved to
overlays but --auto-add-overlay will not be added, causing aapt2
to fail with:
error: resource bool/leanback_outline_clipping_disabled does not override an existing resource.
note: define an <add-resource> tag or use --auto-add-overlay.

Bug: 79481102
Test: m FORCE_AAPT2=true java
Change-Id: Icc67acf23b846bd506a5d397d02ad5775ad0ea1d
2018-05-17 15:09:17 -07:00
Colin Cross
1465806ff2 Fix incorrect renderscript zip deps
Fix some incorrect dependencies after I12d33e52019aebac6ea33271939228e4690a4173.

Bug: 73885582
Test: m java FORCE_AAPT2=true
Change-Id: Ica2758991603e1605f629d843d19df5e2ef4fae1
2018-05-15 16:04:47 -07:00
Colin Cross
532ae3bcfb Support LOCAL_RENDERSCRIPT_TARGET_API := current
Renderscript was using LOCAL_RENDERSCRIPT_TARGET_API := 0 to mean
current.  Use current instead, and check for it when comparing
if LOCAL_RENDERSCRIPT_TARGET_API >= 21.

Fixes an issue where LOCAL_RENDERSCRIPT_TARGET_API := 0 was being
treated as < 21, causing the renderscript resources to be passed
to aapt2:
out/target/common/obj/APPS/RSTestBackward_intermediates/flat-res/zip_res.flata.contents/raw/bc32: error: resource file cannot be a directory.

Bug: 79481102
Test: m java FORCE_AAPT2=true
Change-Id: I7726d0463ce1693bc9653b4d869ced181c491036
2018-05-15 15:28:22 -07:00
Colin Cross
2029903b64 Allow forcing AAPT2 on
Building with FORCE_AAPT2=true will turn on AAPT2 for all modules
unless they set LOCAL_USE_AAPT2 := false.  The build system will
attempt to rewrite common AAPT patterns into AAPT2 patterns,
including removing --extra-packages for support library packages,
removing LOCAL_RESOURCE_DIR point to support library resources,
adding a default empty manifest file if it doesn't exist, and
converting LOCAL_STATIC_JAVA_AAR_LIBRARIES to
LOCAL_STATIC_ANDROID_LIBRARIES.

Bug: 79481102
Test: m checkbuild
Change-Id: I8d9d55fe4d5d5c965c64b0407efe74e0afc35c3a
2018-05-11 02:23:20 +00:00
Alan Viverette
fb8f5baae4 Move Support Library dependencies to their own var with resolution
Bug: 73250914
Test: make checkbuild
Change-Id: Ibdbe2fd140133202b266ca4f233c4d42292fa3df
Merged-In: Ibdbe2fd140133202b266ca4f233c4d42292fa3df
(cherry picked from commit 53f6b2a80b)
2018-05-03 16:47:11 -07:00
Anton Hansson
66d47b884e Update make rules to use new android.jar location.
This file has been copied into a 'public' subdir. Use that, so that
the old file can be deleted. Also introduce a new macro to avoid
duplicating this path in a bunch of places.

Bug: 77525052
Test: m checkbuild
Change-Id: Ifcf59c6fb357769b2765e417c8dd56d2ad9b97aa
2018-04-27 16:39:44 +01:00
Colin Cross
f6d68cf6fe Use a srcjar for aapt and aapt2 output
Dumping files in the *_intermediates/src causes incremental build
problems, because we don't know when to delete them if they are
no longer generated.  Switch to outputting a srcjar instead, and
pass it in to the turbine and javac compiles.

Bug: 73885582
Test: m checkbuild
Change-Id: Ibef28507522339d930c09426d0c98372eb864cb6
Merged-In: Ibef28507522339d930c09426d0c98372eb864cb6
(cherry picked from commit 2d1cddd567)
2018-03-20 15:26:27 -07:00
Colin Cross
7a28158b90 Move aapt2.mk before java.mk
aapt2.mk will export a srcjar that will be compiled by java.mk, so
it needs to be evaluated first.  Also move java_renderscript.mk
before aapt2.mk so that the generated resoures are available.

Bug: 73885582
Test: m checkbuild
Test: rm -rf out/target/common/obj/APPS/RsHelloCompute_intermediates &&
      m out/target/common/obj/APPS/RsHelloCompute_intermediates/src/R.stamp
Change-Id: Ide3050ec993a945f7077b75e952c3b3532306ede
Merged-In: Ide3050ec993a945f7077b75e952c3b3532306ede
(cherry picked from commit 8528eabbba)
2018-03-20 15:26:27 -07:00
Colin Cross
39772fedde Remove redundant renderscript_target_api computation
renderscript_target_api is set by java_renderscript.mk, it doesn't
need to be computed again in static_java_library.mk and
package_internal.mk.

Bug: 73885582
Test: no change to ninja file
Change-Id: Ib6e00be425c385f4911def19ed5042a740f2c79b
Merged-In: Ib6e00be425c385f4911def19ed5042a740f2c79b
(cherry picked from commit 55cce23360)
2018-03-20 15:26:27 -07:00
Colin Cross
dc1e028994 Use srcjar and resource zip as output of renderscript rules
Replace RenderScript.stamp with a srcjar, with a resource zip as
an implicit output.  This makes the renderscript rules self contained,
which will make it easier to move them before aapt.

Bug: 73885582
Test: m checkbuild
Change-Id: I12d33e52019aebac6ea33271939228e4690a4173
Merged-In: I12d33e52019aebac6ea33271939228e4690a4173
(cherry picked from commit e00e2fae52)
2018-03-20 15:25:51 -07:00
Colin Cross
11e2d55c0f Add LOCAL_SRCJARS support
Allow java modules to take jars containing .java files as an input.
For turbine, pass them directly to turbine.  For javac, extract them
to a directory and pass a list of the files to javac.

Bug: 73885582
Test: m checkbuild
Change-Id: Ib4351a5b4b165a55e5fb02ee2680466db368983a
2018-03-14 12:05:04 -07:00
Colin Cross
5ef6e79c21 Remove sharding support from make
Sharding is not used in make any more, the large java modules
(libcore and framework) have moved to Soong.  Keeping sharding
support complicates java compiling, so remove it.

Bug: 73885582
Test: m checkbuild
Change-Id: I2932f9e96bfc8f2ebf82095b16d6c0b3c51613f0
2018-03-14 12:04:55 -07:00
Colin Cross
b6013af085 Move aapt flags from java_common.mk to aapt_flags.mk
The aapt flags were being set in java_common.mk, which is used by
various entry points.  host_dalvik_java_library.mk and
host_java_library.mk, and java_library.mk don't support aapt, only
package_internal.mk and static_java_library.mk do.  Move the aapt
flags into aapt_flags.mk, and include it from package_internal.mk
and static_java_library.mk.

Bug: 73885582
Test: no change to build-${TARGET_PRODUCT}.ninja
Change-Id: I124393846d37b9bbc941272cce4274121ac235ef
2018-03-14 12:04:35 -07:00
Adam Lesinski
960de8efcd Enable apps to build with resource namespaces
Setting LOCAL_AAPT_NAMESPACES := true enables
namespaces for an app and requires any library resources
to be fully qualified by their package.

Test: manual
Bug: 73885582
Change-Id: Ia6bfc82ee8b8d6335f8e7c2abe94ce36467a012d
Merged-In: Ia6bfc82ee8b8d6335f8e7c2abe94ce36467a012d
2018-03-14 12:04:01 -07:00
Colin Cross
6e136922f3 Remove framework_res_package_export_deps
framework_res_package_export is now always either the prebuilt
android.jar from an SDK or a package-export.apk generated by
Soong, so the dependency on R.stamp is never useful.  Remove
all assignments to framework_res_package_export_deps, and replace
usages with frameworks_res_package_export.

Test: m checkbuild
Change-Id: If484e9eb08061cb0ed0697755f13db71d741aaab
2018-03-07 09:47:41 -08:00
Dan Willemsen
c51b7b0d55 Support core_current when exporting resources from a package
Bug: 73351844
Test: with https://googleplex-android-review.git.corp.google.com/c/platform/cts/+/3621794
Change-Id: I20b8adf0d7cb5d948ba752e0732bbe84d39a419a
2018-02-16 13:32:26 -08:00
Adam Lesinski
6b6283a042 NO_STANDARD_LIBRARIES := true blocks ALL resource libraries
LOCAL_RES_LIBRARIES and LOCAL_APK_LIBRARIES should still be honored.

Test: make CtsDevicePrereleaseSdkApp
Change-Id: I3360d0fe2f7e2f3038e48f41905923a72609ceec
2018-02-15 16:53:18 -08:00
Jiyong Park
5ebca30d21 Support LOCAL_SDK_VERSION := core_current
core_current is a pseudo SDK version which is a core Java API subset of
the Android API. It is expected to be mainly used for external Java
projects which are agnostic to Android; such as junit, guava, etc.

A module built with this SDK version can only link to java modules of
the same kind. It can't depend on modules built with LOCAL_SDK_VERSION
:= current or without LOCAL_SDK_VERSION.

Bug: 72206056
Test: m -j
Change-Id: I34a9696393aa6704fd6684a40ea5b05d3fb46b23
2018-02-01 17:14:55 +09:00
Jaekyun Seok
b7735d8105 Support /product partition
This CL adds the following build flags to support building product partition
from Android build system.
- BOARD_AVB_PRODUCT_ADD_HASHTREE_FOOTER_ARGS
- BOARD_AVB_PRODUCT_KEY_PATH
- BOARD_AVB_PRODUCT_ALGORITHM
- BOARD_AVB_PRODUCT_ROLLBACK_INDEX_LOCATION
- BOARD_PREBUILT_PRODUCTIMAGE
- BOARD_PRODUCTIMAGE_EXTFS_INODE_COUNT
- BOARD_PRODUCTIMAGE_FILE_SYSTEM_TYPE
- BOARD_PRODUCTIMAGE_PARTITION_SIZE
- BOARD_PRODUCTIMAGE_SQUASHFS_BLOCK_SIZE
- BOARD_PRODUCTIMAGE_SQUASHFS_COMPRESSOR
- BOARD_PRODUCTIMAGE_SQUASHFS_COMPRESSOR_OPT
- BOARD_PRODUCTIMAGE_SQUASHFS_DISABLE_4K_ALIGN
- BOARD_USES_PRODUCTIMAGE
- LOCAL_PRODUCT_MODULE
- PRODUCT_FOOTER_ARGS
- PRODUCT_PRODUCT_BASE_FS_PATH
- PRODUCT_PRODUCT_VERITY_PARTITION
- TARGET_COPY_OUT_PRODUCT
- TARGET_OUT_PRODUCT*

And PRODUCT_PRODUCT_PROPERTIES is added to save product-specific
properties in /product/build.prop.

Bug: 64195575
Test: succeeded building product.img with BOARD_PRODUCTIMAGE_PARTITION_SIZE,
BOARD_PRODUCTIMAGE_FILE_SYSTEM_TYPE and PRODUCT_PRODUCT_VERITY_PARTITION.

Change-Id: I774e6a38003734421591e51bed103802ff84f432
2018-01-25 09:33:58 +09:00
Nicolas Geoffray
3972a47e9f Tighter control of stripping in dex_preopt_odex_install.
- Move logic to uncompress dexs in an APK in dex_preopt_odex_install.mk
  and definitions.mk.
- Explicitly mark nostripping cases where dexpreopt will not embed the dex
  file in the APK.

bug: 63920015
Test: m
Test: verify priv-apps dexs are uncompressed and unstripped
Test: Verify a non priv-app APK with uncompressed dex doesn't get stripped.

Change-Id: I624a03e3d965cebc0cae43fd6f7a6260178e6b8a
2018-01-18 22:42:46 +00:00
Colin Cross
ab61f213e0 Clear resource_export_package outside conditionals
$(resource_export_package) is used by package_internal.mk outside
ifeq ($(need_compile_res),true), but only cleared inside the
conditional.  This causes unnecessary dependencies to be added
to an old value of $(resource_export_package).  In rare cases,
the dependency can be on itself, causing a dependency loop.

Bug: 71571462
Test: m checkbuild
Change-Id: I9fda7fe3bf9d208ad4ba2f8cdb184034bf43f044
2018-01-04 14:32:14 -08:00
Colin Cross
dc4a6b8513 Use proguard.jacoco.flags for EMMA_INSTRUMENT_STATIC
Add proguard.jacoco.flags whenever EMMA_INSTRUMENT_STATIC is set
so that com.vladium.emma.rt.RT is not stripped.

Test: m EMMA_INSTRUMENT=true EMMA_INSTRUMENT_STATIC=true
Change-Id: Ie64a283d95e8bbf426cd39675d70a3a58768ebc7
2018-01-03 14:21:35 -08:00
Sundong Ahn
f3e8302088 Add LOCAL_SDK_VERSION := system_$(VER)
am: 5a44d1f069

Change-Id: Ief08f78484b654502d356c07d61063a16aad0572
2017-12-01 04:26:10 +00:00
Sundong Ahn
5a44d1f069 Add LOCAL_SDK_VERSION := system_$(VER)
The system_$(VER) can be set in LOCAL_SDK_VERSION, and the apk will use
android_system.jar at build time.
If LOCAL_SDK_VERSION is not defined and this module is installed in
vendor.img, LOCAL_SDK_VERSION is set to system_current.

Bug: 67724799
Test: 1. build && run on taimen
2. LOCAL_SDK_VERSION:=system_27 in ims.apk && build ims.apk && check
the vsdk_v27_intermediates.

Merged-In: I5b11c78b8fcd4a2f2a5e3b141527cd34dbe80018
Change-Id: I5b11c78b8fcd4a2f2a5e3b141527cd34dbe80018
(cherry picked from commit ef212cbe8d)
2017-12-01 00:39:07 +00:00
Dan Willemsen
9b0a730b14 Merge "Add LOCAL_AAPT2_ONLY"
am: da5fbe3c38

Change-Id: I0105575b63e8dca60fad8661443089d168cc0c0e
2017-11-18 02:23:30 +00:00
Dan Willemsen
bb6393c5a4 Add LOCAL_AAPT2_ONLY
This allows modules to specify that they may only be used from modules
using aapt2. Using aapt2 removes absolute path references to modules, so
this can be useful if a module is preparing to move its sources, or
replace itself with a prebuilt aar.

Test: m
Test: Label frameworks/support/design; m
Test: Label frameworks/support/v4; m
Test: build/soong/build_test.bash
Change-Id: Icfb3d4b19a6a0e3a3bb00091d2a97a4d88c0c761
2017-11-17 15:54:15 -08:00
Xin Li
44dd4881de Merge commit '66b8b530187b129934a685bf0c4349eef00e4b0c' from
oc-mr1-dev-plus-aosp-without-vendor into stage-aosp-master.

Change-Id: I7594bb72dd7e847292eb502edd918e41318aac29
Merged-In: Ide82473d358719f7e01cd2a4a85db954f3722f14
2017-11-14 11:36:22 -08:00
Nicolas Geoffray
21a3aef7d7 Merge "Add a product variable for priv-apps dependencies." 2017-11-01 13:40:20 +00:00
Colin Cross
d5cce4c360 Remove PRODUCT_AAPT2_CFLAGS and PRODUCT_AAPT_FLAGS
PRODUCT_AAPT2_CFLAGS and PRODUCT_AAPT_FLAGS are only used to pass
--pseudo-localize.  The flag doesn't need to be conditional on the
product, because the pseudo locale will be stripped out later if it
is not wanted.  Having it conditional on the product causes the
AAPT2-compiled resources to vary between products, which causes
unnecessary rebuilds when swithcing products.

Remove the variables, always add --pseudo-localize, and move
the AAPT2 compiled output to the common intermediates.

Test: m checkbuild
Change-Id: Iacc914114616b5bd19d9a1011802f4f9bca9bc19
2017-10-27 16:25:55 -07:00
Nan Zhang
29d28e58fb Merge "Support java compilation sharding for target side." am: 60e1f8ee27 am: 72165e0c29
am: bbc5a69fc5

Change-Id: I8c65cdeb4d1fc37f86a44c82f82bfe1a10440667
2017-10-13 07:31:27 +00:00
Nan Zhang
ad818dcbea Support java compilation sharding for target side.
Add "LOCAL_JAVAC_SHARD_SIZE" to represent the number of java
source path entries in each shard.

Sharding is not allowed when "LOCAL_JAVAC_SHARD_SIZE" and
"LOCAL_JAR_PROCESSORS" are both enabled.

Limitation:
1. 0 <= LOCAL_JAVAC_SHARD_SIZE <= 8192
1. 0 < NUM(java_sources) <= 8192
2. 0 <= NUM(shards) <= 100

Performance Compare:
<Unsharded Build------------------------------------------------>
1. Build from clean state
rm -r -f out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/
&& time m
out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/classes-full-debug.jar

real	1m2.720s user	5m26.604s sys	0m39.552s

2. Incremental build
m out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/classes-full-debug.jar &&
touch frameworks/base/core/java/android/net/http/HttpResponseCache.java && time m
out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/classes-full-debug.jar

real	0m37.586s user	5m47.804s sys	0m50.388s

<Sharded Build-------------------------------------------------->
1. Build from clean state
rm -r -f out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/
&& time m
out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/classes-full-debug.jar

Javac Shard Size: 50----real	1m10.163s user	25m59.008s sys	1m58.460s
Javac Shard Size: 100---real	1m2.115s user	21m3.600s sys	1m15.964s
Javac Shard Size: 150---real	0m59.520s user	18m10.544s sys	1m12.628s
Javac Shard Size: 200---real	0m56.894s user	15m39.244s sys	1m11.608s
Javac Shard Size: 250---real	0m55.991s user	14m38.716s sys	1m2.292s
Javac Shard Size: 300---real	0m55.114s user	13m6.568s sys	1m8.200s
Javac Shard Size: 350---real	0m53.144s user	12m7.740s sys	1m3.836s
Javac Shard Size: 400---real	0m54.929s user	12m9.324s sys	1m4.340s
Javac Shard Size: 450---real	1m30.194s user	25m31.468s sys	1m52.416s
Javac Shard Size: 500---real	0m53.976s user	10m35.500s sys	0m55.160s

2. Incremental build
m out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/classes-full-debug.jar &&
touch frameworks/base/core/java/android/net/http/HttpResponseCache.java && time m
out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/classes-full-debug.jar

Javac Shard Size: 50-----real	0m16.322s user	1m8.648s sys	0m31.700s
Javac Shard Size: 100----real	0m16.163s user	1m22.932s sys	0m29.440s
Javac Shard Size: 150----real	0m16.611s user	1m37.828s sys	0m21.168s
Javac Shard Size: 200----real	0m16.936s user	1m49.248s sys	0m28.636s
Javac Shard Size: 250----real	0m17.509s user	1m54.944s sys	0m32.768s
Javac Shard Size: 300----real	0m18.868s user	1m54.088s sys	0m28.824s
Javac Shard Size: 350----real	0m17.629s user	1m54.108s sys	0m31.056s
Javac Shard Size: 400----real	0m18.658s user	2m7.712s sys	0m30.636s
Javac Shard Size: 450----real	0m18.874s user	2m8.808s sys	0m33.540s
Javac Shard Size: 500----real	0m19.432s user	2m24.400s sys	0m30.368s

time m nothing:
real 0m5.799s user 0m7.236s sys 0m3.068s

Test: m clean && m -j checkbuild
Bug: b/67424047
Change-Id: Id0766d2b7de7c4546d29bbc7f8a0dd0e4b9ad45b
2017-10-12 13:23:06 -07:00
Nicolas Geoffray
a95fbd1ed5 Add a product variable for priv-apps dependencies.
Those dependencies are jars/apks on which we want to
uncompress their dexs.

bug: 30972906
bug: 63920015

Test: sailfish build

Change-Id: Ic96ffe9dbe39abc1c28e7de134892d689207c9ca
2017-10-06 11:14:08 +01:00
Treehugger Robot
b039cf792f Merge "Delete jack support" 2017-10-03 01:17:25 +00:00
Dan Willemsen
1fc5b81fd2 Merge "Fix incremental aapt builds" am: 26cf972f50 am: cd82b18c8d
am: 9461ca528b

Change-Id: I53aa946b0e13976111e976096c63f6c74d5f249d
2017-10-02 23:32:11 +00:00
Dan Willemsen
cd82b18c8d Merge "Fix incremental aapt builds"
am: 26cf972f50

Change-Id: I7279d4662553a6f31ff2e4ff7d5a482972a2acfb
2017-10-02 23:28:43 +00:00
Dan Willemsen
f439c334da Fix incremental aapt builds
If a resource was moved / removed without any other timestamp updates,
ninja would not re-run aapt. To fix this, add a list of resource files
into the same command as aapt (echo ... >/dev/null). That way if the
list changes, ninja will recognize the command line changing and rerun
aapt.

Bug: 67315436
Test: mmma cts/tests/autofillservice
Test: mv cts/tests/autofillservice/res/layout/welcome_activity.xml \
      cts/tests/autofillservice/res/layout/welcome_activity_test.xml
Test: mmma cts/tests/autofillservice

Change-Id: Ia93ac4ff48910fed74a1f1539ce4e1f5a9db023f
2017-10-02 14:22:02 -07:00
Dan Willemsen
4def685881 Merge changes I7b2fc184,I71f6fcaf am: ea655a138f am: cd4d0d4cc3
am: 6da385ffe4

Change-Id: I4f4059752411a213f84f51c2d11726f9b4fda1b2
2017-10-02 21:05:59 +00:00
Dan Willemsen
cd4d0d4cc3 Merge changes I7b2fc184,I71f6fcaf
am: ea655a138f

Change-Id: Icd7c2390a0a35777bda0a93af534d6a4254fff9b
2017-10-02 20:46:14 +00:00
Colin Cross
69ced5de5e Delete jack support am: a6bc3a8a4c
am: 37bf2b1250

Change-Id: I19133aedbfe91f7cd49588b33f517dc4bb17b91c
2017-10-02 20:00:16 +00:00
Colin Cross
e673deb280 Delete jack support
Remove all support for running jack.

Bug: 65302138
Test: m -j checkbuild
Change-Id: I1ef87c88af3f2689f8b0dcf1a01c958b16159631
Merged-In: I1ef87c88af3f2689f8b0dcf1a01c958b16159631
(cherry picked from commit 5db5d31d73)
2017-10-02 11:15:19 -07:00
Colin Cross
a6bc3a8a4c Delete jack support
Remove all support for running jack.

Bug: 65302138
Test: m -j checkbuild
Change-Id: I1ef87c88af3f2689f8b0dcf1a01c958b16159631
Merged-In: I1ef87c88af3f2689f8b0dcf1a01c958b16159631
(cherry picked from commit 5db5d31d73)
2017-10-02 18:06:56 +00:00
Dan Willemsen
ba9b0fbc05 Fix multiple output file generation for AAPT2
Make R.stamp actually part of the same rule that creates R.java.
Otherwise if the generated sources directory is removed, we don't
regenerate R.java / Manifest.java.

Also move the package-export.apk and proguard options file into the same
rule.

Test: m telephony-common; rm out/target/common/obj/*/*_intermediates/src; m telephony-common
Change-Id: I71f6fcaf20593ca23271d52d15537aaa9ef4cc77
2017-09-29 20:35:32 -07:00
Nicolas Geoffray
95032843ba Merge "Revert "Revert "Make privileged apps always keep uncompressed dex files.""" am: 121fe5a80a am: 279df08f3b
am: 3c36897dbc

Change-Id: I2fe569b2d0f861a724f5a99139350c4d02e280ef
2017-09-20 08:59:35 +00:00
Nicolas Geoffray
b06c30b480 Revert "Revert "Make privileged apps always keep uncompressed dex files.""
bug: 30972906
bug: 63920015

Test: doing zipinfo on the produced apks after build.
Test: fugu build

This reverts commit f69441b76b.

Change-Id: I6b029f2044385f3e3fa332091a9244cec79d2474
2017-09-19 13:09:27 +01:00