- TARGET_BUILD_UNBUNDLED_IMAGE is similar to TARGET_BUILD_APPS, but
its targets are the unbundled partitions instead of apps.
- Rename TARGET_BUILD_APPS_USE_PREBUILT_SDK to TARGET_BUILD_USE_PREBUILT_SDKS
because it is used even without TARGET_BUILD_APPS.
-Instead of TARGET_BUILD_APPS, use TARGET_BUILD_USE_PREBUILT_SDKS
to build java modules with prebuilt sdks, and propagate to Soong.
Bug: 160390776
Test: TARGET_BUILD_UNBUNDLED_IMAGE=true m vendorimage
Change-Id: Ie096212ccbcca0018baae55e106af693b002c9e5
- Adds makefile and which files are installed to the SOONG_CONV CSV file
- Updates soong_to_convert.py to be able to parse that
- Adds new script that is more detailed.
- Outputs that file as part of the droidcore build to
$(OUT_DIR)/target/product/$(TARGET_DEVICE)/mk2bp_remaining.html
Test: m out/target/product/$(get_build_var TARGET_DEVICE)/mk2bp_remaining.html
Change-Id: I7c380b6070754f4329bf3965595751e4dac794a0
These values are used in two out of the many possible sdk_version
configurations, and therefore weren't really defaults in any
meaningful sense. Giving them more descriptive names makes the code
easier to follow.
Bug: 157640067
Test: m java
Change-Id: I67767b2be72ed3d8cc879280036850096eb65415
This change enables recording ALL_DEPS information
without having to specify the deps-license goal, which
can be useful to populate the dependencies field of
module-info.json for various types of post-processing.
Usage: `RECORD_ALL_DEPS=true make droid` (preferred), or
`make RECORD_ALL_DEPS=true droid`.
Test: make, inspect module-info.json
Test: RECORD_ALL_DEPS=true make, inspect module-info.json
Bug: 151755703
Change-Id: Ib81a8dfb0ecbe0b63be320a9d33e558b419cb4b2
Prior to this change, setting that to "false" turned the default Java
language level back to 8. This change removes that option.
Also remove the unused make variable USE_OPENJDK9.
Bug: 115604102
Test: m java droid docs tests cts
Change-Id: I040cf83a2457227ffbcd1c62649e33b98c0c66f7
Treat LOCAL_PROTOC_OPTIMIZE_TYPE := javanano as a plugin by
explicitly passing the path to protoc-gen-javanano. This allows
removing the javanano customizations from the core plugin code,
which no longer supports javanano natively.
Bug: 117607748
Test: m checkbuild
Change-Id: I913d798136fbee9bfaabe1d815b80c85025cb9b9
Merged-In: I913d798136fbee9bfaabe1d815b80c85025cb9b9
Treat LOCAL_PROTOC_OPTIMIZE_TYPE := javamicro as a plugin by
explicitly passing the path to protoc-gen-javamicro. This allows
removing the javamicro customizations from the core plugin code.
Bug: 117607748
Test: m checkbuild
Change-Id: I199f47a64a454594a2fff4c5580c53fd17e0bdee
AAPT2 is used everywhere now, remove support for AAPT1. Also
removes dpi_specific_apk.mk, it was never updated to use AAPT2
and has been generating bad APKs (resource ID mismatch between
the dex files and the resources) since AAPT2 was made the default
in May 2018 (I9b67fd2a9b3234798b2aac879b5242c2097b3863).
Bug: 80450981
Test: m checkbuild
Change-Id: I2ff768897360ff866dbae5562455bab22be270f7
Merged-In: I2ff768897360ff866dbae5562455bab22be270f7
To solve AIDEGen issue: DocumentsUI have no dependency libcore.
Bug: 122557164
Test: 1. m `build/soong/soong_ui.bash --dumpvar-mode PRODUCT_OUT`/module-info.json
2. open $ANDROID_PRODUCT_OUT/module-info.json
"out/target/common/obj/JAVA_LIBRARIES/core-lambda-stubs_intermediates/classes-header.jar",
"out/target/common/obj/JAVA_LIBRARIES/core.platform.api.stubs_intermediates/classes-header.jar",
"out/target/common/obj/JAVA_LIBRARIES/ext_intermediates/classes-header.jar",
"out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/classes-header.jar"
will be added to DocumentsUI's dependencies.
Change-Id: I6b20c315f3367ff2a016d305ec6fe2a8de620a14
The impl lib name of java_sdk_library is changed to {module_name}.jar
instead of {module_name}.impl.jar
Bug: 110404779
Test: m -j
Change-Id: I275cd40e3682640b96425e56698cea770888cbb1
Merged-In: I275cd40e3682640b96425e56698cea770888cbb1
(cherry picked from commit 0372f189ac)
Mainline modules are tightly coupled to the platform, and should
build against the current SDK from source and not prebuilts. Add
a flag UNBUNDLED_BUILD_SDKS_FROM_SOURCE to specify that a
TARGET_BUILD_APPS build should build the current SDK instead of
using the prebuilts.
Bug: 121194841
Bug: 121231426
Test: no change to out/build-aosp_sailfish.ninja
Test: forrest unbundled build
Test: forrest master apps build
Test: forrest mainline modules build
Change-Id: I9ebc08745409a817d831817cb282aba1de6d81bb
This fixes a bug where cross host OS notice dependecies were incorrectly
added and caused missing file errors.
Bug: 36073965
Test: Manual build + inspection
Change-Id: I3983ad6158acf939842f836fe3f44cecf9187087
Protobuf 3.5.2 does not natively support lite protos, instead they
are generated by the protoc-gen-javalite plugin compiled from
external/protobuf-javalite.
Bug: 117607748
Test: m checkbuild
Change-Id: I166d55111435762f099503db83c1a658f78e98e9
The previous PATH=$PATH:out/... logic was incorrect, since the version
in $PATH would override the one out. And now that we're limiting what's
accessible via $PATH, that caused an error.
Instead, ensure that all protoc plugins are specified explicitly with
--plugin, then remove the PATH modification.
Test: cd frameworks/base/cmds/am; mma (with protoc-gen-javastream in $PATH)
Change-Id: I6690727504f67f84fdc95ed93eabdf3351e5cb0b
Soong doesn't support LOCAL_JNI_SHARED_LIBRARIES yet, add it to the
problems list.
Bug: 80095087
Test: examine soong_to_convert.txt
Change-Id: I44f7a486b1e9de276416f74a4cb2b7f4eafce4ef
Track transitive static dependencies of native binaries, and
and direct and transitive static dependencies of java and app
modules.
Bug: 112331930
Test: m checkbuild
Change-Id: I0e19971033d6254bfbb6555f0e68fd5e529569c6
Run ErrorProne as a processor in javac from OpenJDK9.
Bug: 69485063
Test: m RUN_ERROR_PRONE=true javac-check
Change-Id: I2dde597430b47c440df22d248809233a6ade1625
A java module exports SDK library names that it is using directly or
indirectly via its dependencies. Manifest fixer uses the SDK lib names
to automatically add <uses-library> tags for the apk.
The SDK library names are exported via exported-sdk-libs file in make.
From Soong, they are exported via LOCAL_EXPORT_SDK_LIBRARIES flag.
Bug: 77575606
Test: m -j
Change-Id: I4e7a9bdc5bf845af85168abf55f8063900bacc72
LOCAL_PRIVATE_PLATFORM_APIS := ture means that the apps or packages can
use the private API. So, if LOCAL_PRIVATE_PLATFORM_APIS := true, they
are linked to ".impl" instead of ".stub".
Bug: 77577799
Test: build
Change-Id: I782e52078bb8c4139c3a24862cb381f6a84e53fe
There was a bug that when an unbundled app is built without SDK
(LOCAL_SDK_VERSION isn't set), it is linked to the nonexisting stubs
library from java_sdk_library. The built stubs libs are not created for
unbundled builds. For unbundled builds, we need to use the prebuilt
stubs lib.
Bug: 77575606
Test: m -j
Test: make -j dist
ANDROID_BUILDSPEC=vendor/google/build/app_build_spec.mk
Change-Id: I70cced1c872053e151fea157e3a6d218b1fab9dc
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
They should be depended on by specifying LOCAL_SDK_VERSION. Depending
on them directly makes it difficult to rename or modify these targets,
as I've found when working on b/77525052.
This list can be further extended to other libraries that should not
be depended on directly.
Bug: b/77525052
Test: make
Change-Id: I911bcc8a5a90995b3607599388dc6119eb88ea96
When an sdk lib name (a module defined with java_sdk_library{...}) is
listed in LOCAL_JAVA_LIBRARIES or LOCAL_STATIC_JAVA_LIBRARIES, the name
is translated to the stubs lib name of the sdk lib.
We have to support this at least until all existing references to sdk
libs are all correctly converted to LOCAL_SDK_LIBRARIES.
Bug: 77575606
Test: m -j
Change-Id: I8cff668afd6b5f265cc7ae6fe6f5fa36b76b8334
When a module built with LOCAL_SDK_VERSION := test_current, then
it is linked against test variant of the sdk stubs library.
Bug: 77575606
Test: m -j
Change-Id: I08ce120d8e4774722a95bfc4e200ad7d123abc70
Resolve these using the naming scheme from sdk_library.go, added
in I4a4ccf6e730e041703c63bb275d8860d0de96887.
Also re-write the LOCAL_SDK_VERSION logic, as it was becoming a
real mess.
Bug: 77575476
Test: With uiautomator in a follow-on CL
Change-Id: I11bd10c02df3d458a4ed6de90114e27fabe8d9e0
This new variable allows specifying libraries like this:
LOCAL_SDK_VERISON := 25
LOCAL_SDK_LIBRARIES := org.apache.http.legacy,
which would automatically pick up the prebuilt OAHL prebuilt
from prebuilts/sdk/25/public/org.apache.http.legacy.jar
Test: In master with uiautomator.
Bug: 77575476
Change-Id: Id8d92176f5b608c2bcea622b6aed4aa27c32e000
I'm making some changes to it, and found the names are scattered
in various places. Make a macro and re-use the logic instead.
Bug: 77525052
Test: make droid
Change-Id: I0f2da80b8b4d427353509b27ec720d024eee7a6e
Move java renderscript support to java_renderscript.mk in
preparation to moving it before aapt. Filter *.rs files
out of LOCAL_SRC_FILES and forbid them in java_common.mk
so that using *.rs files is an error if java_renderscript.mk
was not included.
Bug: 73885582
Test: m checkbuild
Change-Id: Ib37ce89daee58b025dec98f733c5a08149641afd
Merged-In: Ib37ce89daee58b025dec98f733c5a08149641afd
(cherry picked from commit 71822d6fb9)
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
Merged-In: Ib4351a5b4b165a55e5fb02ee2680466db368983a
(cherry picked from commit 11e2d55c0f)
RS_FILES and AIDL_FILES were used for cleaning up the intermediate
src dir, but are no longer used after
If7529979de6fa62a651933a3a974f47b033851d6 and
I01feff7cc399ac5b88b83333a1ac86928d0a81e6.
Bug: 73885582
Test: m checkbuild
Change-Id: If2653f846b568fd2587c8e055ef820e17760f133
Merged-In: If2653f846b568fd2587c8e055ef820e17760f133
(cherry picked from commit c3e7074df1)
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
Merged-In: I124393846d37b9bbc941272cce4274121ac235ef
(cherry picked from commit b6013af085)
PRODUCT_AAPT_FLAGS was removed by Iacc914114616b5bd19d9a1011802f4f9bca9bc19,
remove one more that it missed.
Bug: 73885582
Test: m checkbuild
Change-Id: I31ea4954f5af5af37f13210925ed5d622625d71b
Merged-In: I31ea4954f5af5af37f13210925ed5d622625d71b
(cherry picked from commit 8dad6c62d4)
Move java renderscript support to java_renderscript.mk in
preparation to moving it before aapt. Filter *.rs files
out of LOCAL_SRC_FILES and forbid them in java_common.mk
so that using *.rs files is an error if java_renderscript.mk
was not included.
Bug: 73885582
Test: m checkbuild
Change-Id: Ib37ce89daee58b025dec98f733c5a08149641afd
Merged-In: Ib37ce89daee58b025dec98f733c5a08149641afd
(cherry picked from commit 71822d6fb9)
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