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
bug: 30972906
bug: 63920015
Test: doing zipinfo on the produced apks after build.
Test: fugu build
This reverts commit f69441b76b.
Change-Id: I6b029f2044385f3e3fa332091a9244cec79d2474
Broke Fugu build. Will work on a workaround for it.
bug: 30972906
bug: 63920015
This reverts commit 09dfe6739a.
Change-Id: I5a8b8de4ec98ae44808762ca1ba974ce89bebb05
To ensure the verified boot work does not make ART run
dex code uncompressed in memory, make the build system
generate uncompressed dex files in APKs.
The alignment of STORE files in an APK is already handled.
bug: 30972906
bug: 63920015
Test: doing zipinfo on the produced apks after build.
Change-Id: I0ccdeae5d674b2a409a1343c4a14699c7bf0defb
PRODUCT_ENFORCE_RRO_EXCLUDED_OVERLAYS will be used to specify overlays
to be excluded from enforcing RRO.
The excluded overlays will be applied into the original package.
Bug: 63600240
Bug: 65001751
Test: succeeded building with
PRODUCT_ENFORCE_RRO_EXCLUDED_OVERLAYS := \
vendor/google/google_overlay/static_only \
vendor/google/nexus_overlay/common/static_only
and confirmed that config_webview_packages existed in framework-res.apk
with the overlayed value, but not in framework-res__auto_generated_rro.apk.
Change-Id: I0bfb44fc7726710bb78d9100404bc6dd29d06a73
Move the java source list generation step into its own rule. This
has a couple of advantages. It consolidates the source list
generation so that it only has to run once for javac, jack, and
jack-check. It also massively reduces the length of the javac
command line, so that error messages are significantly shorter,
and allows easily rerunning the failing build command because
the file list is still on disk.
The primary disadvantage is that javac error messages no longer
include the list of files passed to javac, but the list is
available earlier in the build long when the file list was written,
and is still available on disk.
Test: m -j javac-check
Change-Id: I9730b352b33a060e08221b61c11c617d23320d67
jar -C <dir> . produces a jar containing files in filesystem order,
which can vary between builds. Manually find and sort the list of
files, and convert them into a list of -C <dir> <file> pairs.
Fixes: 64634025
Test: m -j checkbuild
Test: m -j out/target/product/sailfish/system/framework/ext.jar, check
that entries are sorted
Test: m -j out/target/product/generic_arm64/system/framework/ext.jar on mac
Change-Id: I7dced6acbe621a60cd49daf17872941485602732
Replace java -> $(JAVA), etc. to prepare for moving java binaries
out of the path and using full paths to them.
Test: builds
Bug: 62956999
Change-Id: I5dfcd0d4e855ecde69cd127169e9545e59723d12
We no longer need to use $PRODUCT_OUT/obj/lib as a linker path, we can
directly specify the shared libraries to the linker.
So install both into the standard built module path, and declare a copy
rule to the old OVERRIDE_BUILT_MODULE_PATH location. This way we can
incrementally move users from the old location to the standard path.
Test: m -j
Change-Id: I3c6140ac26e5e5ca486337ce0192e15e530da32c
Merged-In: I3c6140ac26e5e5ca486337ce0192e15e530da32c
We no longer need to use $PRODUCT_OUT/obj/lib as a linker path, we can
directly specify the shared libraries to the linker.
So install both into the standard built module path, and declare a copy
rule to the old OVERRIDE_BUILT_MODULE_PATH location. This way we can
incrementally move users from the old location to the standard path.
Test: m -j
Change-Id: I3c6140ac26e5e5ca486337ce0192e15e530da32c
With LOCAL_USE_AAPT2, resource directories like a/b/../res cause
problems, since ninja will canonicalize the path before creating the
intermediate resource directory, so it creates <intermediates>/a/res
while we give AAPT2 <intermediates>/a/b/../res, which fails to open.
Bug: 37716307
Test: Switch LOCAL_USE_AAPT2:=true for TelecommUnitTests, mma
Test: lunch aosp_marlin-userdebug; m -j
Change-Id: Id0d167e68185a119390e7b7e3c344895e77ca0e3
Bug: 37626838
Since Lollipop, RS generated bitcode is embedded as strings in
generated Java files, and no longer needed in the resources.
This CL makes packaging resources conditional on RS target API, and
not do so unless it is below 21.
Test: mm in frameworks/rs/tests/java_api/Refocus, ImageProcessing2, and
ImageProcessing_jb
Change-Id: I79a90ed4b96cb78b22a64a35b539d9d67351f4c4
(cherry picked from commit e2c0901918)
Bug: 37626838
Since Lollipop, RS generated bitcode is embedded as strings in
generated Java files, and no longer needed in the resources.
This CL makes packaging resources conditional on RS target API, and
not do so unless it is below 21.
Test: mm in frameworks/rs/tests/java_api/Refocus, ImageProcessing2, and
ImageProcessing_jb
Change-Id: I79a90ed4b96cb78b22a64a35b539d9d67351f4c4
Downstream users of a library always link against javalib.jar, which
is either the dex jar for java libraries or a copy of
proguard.classes.jar for static java libraries. In preparation for
making java libraries a superset of static java libraries, make
classes.jar always be the final class-containing jar for use
downstream, and always create a classes-pre-proguard.jar for
users that need a jar without shrinking or obfuscation.
Also rename the intermediates to be consitent: classes-<tool>.jar
Bug: 36902714
Test: m -j ANDROID_COMPILE_WITH_JACK=false java
Change-Id: I3df8b9a4edcd5db996f1fedc54c8a782d4f36a92
(cherry picked from commit 6fabefa88e)
Downstream users of a library always link against javalib.jar, which
is either the dex jar for java libraries or a copy of
proguard.classes.jar for static java libraries. In preparation for
making java libraries a superset of static java libraries, make
classes.jar always be the final class-containing jar for use
downstream, and always create a classes-pre-proguard.jar for
users that need a jar without shrinking or obfuscation.
Also rename the intermediates to be consitent: classes-<tool>.jar
Test: m -j ANDROID_COMPILE_WITH_JACK=false java
Change-Id: I3df8b9a4edcd5db996f1fedc54c8a782d4f36a92
Merged-In: I3df8b9a4edcd5db996f1fedc54c8a782d4f36a92
(cherry picked from commit 6fabefa88e)
Board-based rule can cause unexpected regression because build-time overlays
are different among products. So each product should be tested with its own
product-based rule considering its build-time overlays before applying
enforcing RRO.
Additionally RRO conversion is mandatory only for overlays of which target is
included in AOSP system image and is critical for CTS/VTS tests with AOSP
system image. So inclusive rule is more suitable instead of exclusive rule
to avoid unexpected regression due to unnecessary RRO conversion.
Note that we still support conversion for all the overlays by specifying
PRODUCT_ENFORCE_RRO_TARGETS as "*".
Test: building succeeded and tested with auto-generated RROs.
Bug: 36231603
Change-Id: I8e1d701d4f78b818c89ef3e7638110105370c5bc
(cherry picked from commit 2a209997e8)
Board-based rule can cause unexpected regression because build-time overlays
are different among products. So each product should be tested with its own
product-based rule considering its build-time overlays before applying
enforcing RRO.
Additionally RRO conversion is mandatory only for overlays of which target is
included in AOSP system image and is critical for CTS/VTS tests with AOSP
system image. So inclusive rule is more suitable instead of exclusive rule
to avoid unexpected regression due to unnecessary RRO conversion.
Note that we still support conversion for all the overlays by specifying
PRODUCT_ENFORCE_RRO_TARGETS as "*".
Test: building succeeded and tested with auto-generated RROs.
Bug: 36231603
Change-Id: I8e1d701d4f78b818c89ef3e7638110105370c5bc
This CL is to generate every static RRO package for its target package
automatically at build-time.
BOARD_ENFORCE_RRO build variable is added to specify whether enforcing
RRO is required or not.
BOARD_ENFORCE_RRO_EXEMPT_SOURCES build variable is added to specify
the module list of which item should be exempt from enforcing RRO.
Test: tested on bullhead and sailfish
Bug: 34097942
Change-Id: I455b2ce34e66c57a540c299b5e378b7c4e78d5b8
(cherry picked from commit 3070610b72)
Although performing the inclusion of assets/ at a later stage is
preferable, (since aapt just copies the files) do the easy thing and
support what aapt did. In the future perhaps we can zip up the
assets/ directories when also merging in the classes.dex.
Bug: 35461578
Change-Id: I7d7fde43333ea6455c4a1b9113bd25e1d88b7dd5
Test: manual
This reverts commit 996bc3ce7b.
Reason for revert: Need to update prebuilts, but prebuilts not built by server yet...
Change-Id: I87deb3ed9512278ff40c185059230dbd66524989
Although performing the inclusion of assets/ at a later stage is
preferable, (since aapt just copies the files) do the easy thing and
support what aapt did. In the future perhaps we can zip up the
assets/ directories when also merging in the classes.dex.
Bug: 35461578
Test: manual
Change-Id: I7cd36585e7c292e43b5528969900c6ead2b80c0b
This CL is to generate every static RRO package for its target package
automatically at build-time.
BOARD_ENFORCE_RRO build variable is added to specify whether enforcing
RRO is required or not.
BOARD_ENFORCE_RRO_EXEMPT_SOURCES build variable is added to specify
the module list of which item should be exempt from enforcing RRO.
Test: tested on bullhead and sailfish
Bug: 34097942
Change-Id: I455b2ce34e66c57a540c299b5e378b7c4e78d5b8
1) Updates the LOCAL_COMPATIBILITY_SUITE line to allow for a
testcase to belong to multiple suites.
2) Building testcases no longer fails if
COMPATIBILITY_TESTCASES_OUT_<suite> is not defined. This
testcase will just not output to that directory.
This will be utilized by the device-tests and general-tests
suites that don't require any extra output besides the common
testcase directory.
Bug: 35394351
Test: 1) Added multiple *TS testcases to cts & vts and verified they
ended up in the common directory and each suite's testcase
directory. Specifically tested CtsSplitApp to ensure the
split usecase still works as well.
2) Added a CTS testcase to the device-tests suite, built
device-tests and verified the cts/android-cts/testcases
copy was not produced.
Change-Id: Ic4c4e87e62be4fc0c5e394d88cc359518346dffa
This is a partial revert of commits:
858657366f Remove support of disabling Jack.
3ae7861252 Remove javac support in host dex rules.
22313f2b2a Remove rules for building dex with dx
Test: builds
Change-Id: Ie12d743cbe978bdeb030910848b67f5945a4fec8
Instead of dumping all *TS testcases into the common testcase
directory directly, place them all in their own subdirectory.
Bug: 35153177
Test: `make cts -j` and checked the contents of both:
out/host/linux-x86/testcases/ &
out/host/linux-x86/cts/android-cts/testcases/
Change-Id: I22a768dba58d40be1e61885534fb813e7ff08c99
Aggregates the different *TS testcases into two common folders,
one under each the host and product hierarchies.
Bug: 34715822
Test: `make cts -j` and checked the contents of both:
out/host/linux-x86/testcases/ &
out/host/linux-x86/cts/android-cts/testcases/
Change-Id: I7d5201998ddcb011ecc687c272a0d0a36da248b7
Building with LOCAL_STATIC_ANDROID_LIBARIES and LOCAL_USE_APPT2
causes a warning:
build/core/package_internal.mk:143: Empty argument supplied to find-subdir-assets
Only call find-subdir-assets if my_res_dir is not empty.
Also improve the warning message to make it easier to find the module
that caused it.
Test: m -j
Change-Id: I9a71162c7e2ed82f64d6844baca256968ac77317
A few module types add extra dependencies on $(my_register_name), move
them to $(my_all_targets) so that they are built for mm and mma too.
Bug: 31526036
Test: mmm framework
Change-Id: I2e594ce771451a99691739b963f4ce517e9dd595
This workaround to clean package intermediates is no longer necessary,
as ninja reruns commands whose command line changes.
Test: switch between product overlays that use add-resource, verify
R.java is regenerated.
Change-Id: Icb1f76360e39882e4401180414a031956777b020
AAPT2 allows the declaration of a split path, so that build systems
don't need to guess the auto-generated name.
Construct the split path we want from the configurations passed in to
LOCAL_PACKAGE_SPLITS.
Bug:30445078
Change-Id: I06a4148b283d0c6751751ba116e9482c3a6eae5d
am: f562875d0c
* commit 'f562875d0c232b91be9a0931d30c31b1bbb98c45':
Make apks depend on their certificates
Change-Id: I28f5f91a6265201136cdf83c18c7ada359bb4d33