PDK builds need to use the latest SDK version instead of "current"
to match the behavior of Make.
Bug: 118634643
Test: sdk_test.go
Change-Id: Ice10d0ccb4066f27ce5839fc96a4026510057121
Split out SDK handling functions from java.go to sdk.go and tests
from java_test.go to sdk.go.
Test: sdk_test.go
Change-Id: I83ef48cbe5230572c1d4ecc0e89021d2f7c71b76
Add a no_stripping property and pass it to dexpreopt to disable
stripping for a module.
Bug: 122610462
Test: dexpreopt_test.go
Change-Id: I5a4b005633bb8b1ea373e9eeb420aa0999de17ab
As suggested in b/118390303#comment18, let me run
"goma_ctl.py ensure_start" in soong UI.
Bug: 118390303
Test: stop compiler_proxy, and execute following command:
Test: USE_GOMA=true lunch aosp_arm-eng
Test: and confirms compiler_proxy is running.
Change-Id: I859daae6ae2399c5b6bce2fafd874dfdb7c6aae0
Signed-off-by: Yoshisato Yanagisawa <yyanagisawa@google.com>
If a lib is directly included in an APEX (via native_shared_libs
property) and the lib has stubs (via stubs.versions property), then the
ordinary non-stubs variant of the library is renamed to
<libname>.bootstrap in the makefile. At the same time, the stubs variant
of the lib becomes visible and it's name is <libname>.
This ensures that modules in Android.mk build against the stubs
variant thus preventing them from using private APIs in the lib.
The non-stubs variant, however, is used if the module explicitly has
set the new 'bootstrap' property to true. This is useful for building
some early binaries (such as init and vold) which need to run before
APEXes are activated. Since they can't use the bionic libs from the
runtime APEX, they should use the bionic libs left in the system
partition which is called the boostrap bionic.
Bug: 120266448
Test: m
Test: m with https://android-review.googlesource.com/c/platform/bionic/+/849044
Change-Id: I882b8aeb5b29460f07b4424e4f8eb844d6c9a9b0
If dexpreopt is disabled for a module then classes.dex must not be
stripped.
Bug: 121377197
Test: m WITH_DEXPREOPT_BOOT_IMG_AND_SYSTEM_SERVER_ONLY=true
Change-Id: Icfa48804cf02291874ac6623c9b9297821ac8ce6
It is a list of <module_name>:<manifest_name> pairs. When the module
name of an APK or an APEX matches with <module_name>, then its app
manifest name is overridden to <manifest_name>.
<module_name> and <manifest_name> can be patterns as in
com.android.%:com.mycompany.android.%.release
Note that, in case of APEXes, the manifest name refers to the name of
the zip container. The apex manifest name (which is specified in
apex_manifest.json) is not overridden.
Test: m with PRODUCT_MANIFEST_PACKAGE_NAME_OVERRIDES for
1) an APK in Android.mk
2) an APK in ANdroid.bp
3) an APEX
and check that manifest names are modified as specified
Change-Id: Ie58882d90884695e893944c43d9c8803b283e93d
shouldUncompressDex has already been computed and stored in
deviceProperties.UncompressDex, pass it to dexpreopter instead
of recomputing it.
Also add a stub for java libraries to set UncompressDex.
Test: no change to build.ninja
Change-Id: I663d9fbbe768a8dc9a97c7d456dd7a010f43162d
This change fixes a bug where androidmk assumes all-*-files-under
function only takes one directory parameter.
Test: androidmk_text.go, manual execution
Change-Id: Ib1614a2ddde7ea1120c1c37126231988f4862165
Executables under /system/bin are configured as (uid:gid)=(root:shell)
by fs_config.cpp. Therefore, an executable that is moved/copied from
/system/bin to an APEX should be configured as such.
Test: adb shell ls -al /system/bin/linker
/apex/com.android.runtime/bin/linker shows
-rwxr-xr-x 1 root shell 1133528 1970-01-01 09:00 /apex/com.android.runtime/bin/linker
-rwxr-xr-x 1 root shell 1133528 1970-01-01 09:00 /system/bin/linker
Change-Id: Ibb698aab237362fed312da2af809cceead8a1092
As part of a future change to sandbox the build on Linux, the real
username will be switching to "nobody", and the hostname will be
switching to "android-build".
The USER environment variable will reflect the sandboxed value, so for
the build properties that want the external USER, they'll need to use
BUILD_USERNAME.
Similarly, BUILD_HOSTNAME will reflect the real value, while the
`hostname` tool will return "android-build"
Bug: 122270019
Test: check build.prop
Change-Id: I99604b9488732a63690b256dc4dd7894d369a32c
Now java_import with a host flag set to true is converted to
java_import_host.
Bug: 122372359
Test: bpfix_test.go + manual test with real examples.
Change-Id: Ie38fa51a44c83c434927db4b742d6839c64b3d63
Modules shouldn't be dexpreopted and possibly stripped when
compile_dex is set but installable is not set. This matches the
previous behavior when the dexpreopt rules were in Make.
Bug: 121317615
Test: dexpreopt_test.go
Change-Id: I6f80b7b37a990c475b91aa5d98a19a3baa85eb1b
I6bb2c971cee65d2338839753aa0d84939f335b1b accidentally caused
java_test modules to be dexpreopted and possibly stripped.
Test: dexpreopt_test.go
Change-Id: Ida8f046c509c97e38bd3bce66944d32f01530db4
Add methods to TestingModule that return an empty BuildParams instead
of panicking, which can be used to test if a module has a matching
rule. Also add godoc to the TestingModule methods.
Test: m
Change-Id: Iea2ab9be57d3f3f60437041f4e5a7e2100e1fe48