The entire APEX (which is a zip file) is signed with the apk signer.
Certificate can be specified via the 'certificate' property just like
ordinary apps. Note: multiple additional certificates are not supported.
Bug: 115721587
Test: m apex.test
Test: jarsigner -verify -verbose -certs .../apex.test.apex shows the
certificate info
Change-Id: Ia4c898d3427779a3809fdc683b85d7661ca65137
APKs that are preopted to system_other should not be stripped.
For now, don't strip any APKs.
Bug: 118592830
Test: m PrintSpooler; zipinfo $OUT/system/app/PrintSpooler.apk | grep classes.dex
Change-Id: Ife8a5fe4ff90e5e00ec24f43e089d9b3aa552fc0
This (effectively) reverts commit 3c979c3348.
core_platform_current is the new default when no_framework_libs: true
so doesn't need to be specified anywhere.
Bug: 113148576
Test: build
Change-Id: I6bb6c1a0ea24437c8253dc5d8fabd37edabc9d3e
This detects whether this is enabled, makes sure the other necessary
flag is set to provide a suitable location, and suppresses the
requirement for a previous_api.
Test: making a new libcore target using this
Bug: 73448108
Change-Id: Ifea3a060011a58e3288050c6c5d98b205abe25fc
Privileged APKs need to store their dex files uncompressed so they
can be verified and mapped directly out of the APK.
Also track whether the module will be dexpreopted or not in order
to determine if the dex file should be stripped before signing.
Test: SystemUI.apk contains an uncompressed dex file
Change-Id: I4dca86c7f8778595882405b34adcf2a7bae03c67
Without the annotation args the check API fails for
APIs that use visibility annotation args.
Bug: 117936519
Bug: 113148576
Test: build
Change-Id: Ie9d2116c7f255634de72de9a448f5c378c11c457
getLinkType also tells whether the module in question is a stubs lib or
not. If it is a stubs lib, link type from it isn't checked beause
dependency from the stubs lib doesn't matter; the stubs lib is
build-time only artifact.
In addition, core-lambda-stubs is added to the list of stubs libs.
Bug: 117964170
Test: m with https://android-review.googlesource.com/c/platform/libcore/+/793518/4
Change-Id: Ibd63484a1cc48dfd0afed6e6de098b7a38db5e61
* changes:
Fix instrumentation_for to match LOCAL_INSTRUMENTATION_FOR
Fix incremental build issue in aapt2
Support main_class property in java_binary modules
Always allow duplicates with identical CRC32 and size
The value from instrumentation_for should not go to
aapt2 link --rename-instrumentation-target-package, that should
be the equivalent of LOCAL_MANIFEST_INSTRUMENTATION_FOR. That
property is never used in Make, so it is left unimplemented in
Soong.
Add the module listed in instrumentation_for as a shared library
for javac, but don't import its resources.
Bug: 117804211
Test: m checkbuild
Change-Id: I7f035dc0ecb964a3ca391ae1ca2b87cb0f6a7cec
Clear the directory with generated java files before generating
new files into the directory. Fixes an issue where old, no longer
generated files could remain and end up in R.jar.
Test: m checkbuild
Change-Id: I174030c336c5b7e6fe1198a43714af565babd7e6
Add a main_class property that will be used to generate a manifest
containing a Main-Class entry.
Test: m checkbuild
Change-Id: I0a59bb2b93cad915afd82fba708fa0f7eda2fe7a
Various "core library" targets are no longer used in
soong so the tests do not have to create fake build
rules for them.
Bug: 113148576
Test: make droid
Change-Id: Ic754b4195f1597fb599e496c08940231ecbb13f7
Switch targets that don't explicitly specify an sdk_version
to using core.platform.api.stubs instead of the core library
implementations.
Note: the old core-oj target contained the source for
core-lambda-stubs too. The new core.platform.api.stubs
does not contain core-lambda-stubs so it is explicitly
added to the boot classpath list as part of the switch over.
Bug: 113148576
Test: build
Change-Id: I689d2127f6b69b4a7034fb96f3d9cf714f801794
The metalava is supported instead of doclava. However, not all sdk
libraries are available now. So metalava_enabled property is added for
it.
when using metalava, DroidstubsFactory module will be created instead of
DroiddocFactory.
Test: make -j
Test: make apicheck
Bug: 117127012
Merged-In: I7fd10230bfe30a4ef4dceb1a4459145b674668cd
Change-Id: I7fd10230bfe30a4ef4dceb1a4459145b674668cd
(cherry picked from commit 0817d01ab1)
To migrate the default compilation over to using
"core platform api" stubs we need to make the "before"
state as close to the "after" state as possible.
The stubs will include all "core libraries" so it
makes sense to include those that contribute to the
"core platform api": okhttp, bouncycastle and conscrypt.
(apache-xml is not included because it doesn't contribute
to the core platform API).
After this change all explicit dependencies to okhttp,
bouncycastle and conscrypt in situations where the
default boot classpath is used can be removed.
A knock-on of this change is that the conscrypt, bouncycastle
and okhttp targets need to be adjusted to explicitly
depend on core-oj / core-libart with no_standard_libs: true
to avoid a cycle.
Bug: 113148576
Test: treehugger
Change-Id: I1677af8d9d48fd026874ebce4c864f39ec1a5a3d
Add a module that can build an APK that will be used by a test.
The APK will be sideloadable, and can be added to a test suite,
but will not autogenerate a test config file.
Test: m checkbuild
Change-Id: Idf325b1c9a2cbcd16b126da3331671e4aed4b3da
Some android_app modules need certificates located outside their
directory. Instead of requiring paths from the root of the tree,
add an android_app_certificate module that exports the certificate
files.
Test: m checkbuild
Change-Id: Icbf3898894f3eb857e2d907e3e58dd072c6fabe9
Make android_app modules a MultiTargets module, which means the
common variant will have a list of Targets that it needs to handle.
Collect JNI libraries for each Target, and package them into or
alongside the APK.
Bug: 80095087
Test: app_test.go
Change-Id: Iabd3921e1d4c4b4cfcc7e131a0b0d9ab83b0ebbb
If Srcs contains only srcjar, sourcepath is null and an error occurs. So
if sourcepath is null, we will use the "-sourcepath "" ".
Test: m -j
Bug: 112397488
Change-Id: I03ac0074fc041203fa1b427d4b4a418af44e85e2
From now on, a java shared library can be built only with adding
".sysprop" description file to srcs. Sysprop library generator will
automatically generate a .java file, and soong will wrap it into .srcjar
file which will finally be contained in the java library. For the schema
of description file, see system/tools/sysprop/sysprop.proto.
Bug: 80125326
Test: 1) write a .sysprop description file.
2) create java_library and add description file to srcs.
3) create a test app, link against library of 2), and call generated
sysprop methods.
4) see compile succeeded.
Change-Id: I3ff87bc0a20f5a1aa126ef6d0f4d874a2ff4af8d
prefer32 needs to be set differently for app and native modules.
Make it use lambda provided by the module type instead of trying
to make archMutator figure it out.
Test: m checkbuild
Change-Id: Ibf8af35fdd3e1721725539d1f5452f4439d2125c
Make java_import, android_library and android_library_import modules
defaultable, and add some missing property structs to java_defaults.
Also use InitJavaModule everywhere.
Test: m checkbuild
Change-Id: I981875bbec5d1f87bae73f36a385e0b77c56c368
When sdk_version is equal to or less than 28, java_version is implied to
1.8 unless it is explicitly specified. It was 26 originally, and is now
updated to 28 which is the most recent API version.
Bug: 117069453
Test: EXPERIMENTAL_USE_OPENJDK9=true make apex_aidl_interface
Change-Id: I18ebe3ec51ada54103f6d203b9bfae8ec6ea5d90
Using a directory to zip the output of d8 and r8 was causing the
empty classes.dex.jar file in the output directory to get
zipped in. Use a file glob instead so that it only picks up the
classes*.dex files even if classes.dex.jar already exists.
Test: m checkbuild
Change-Id: I1f3c1cbc23439fc52756aad027ab8cac10213d1d
-f and -D arguments can now take globs in the Soong format.
Also update the use of soong_zip that jars resources to escape the
globs in the arguments, and then shell-escape them when writing to
the rsp file so the glob escape are not intepreted by ReadRespFile.
Also remove an unused argument to the buildAAR rule that could
have contained values that needed escaping.
Relands I7f20bb169dc01f952d2a7681ec6ee9c05737ed37 with a fix for
trailing "\n" in list files, which causes a call to pathtools.Glob("")
that returns "./", which could then get incorrectly translated to
"../../../" in the zip file. Also adds tests.
Test: m checkbuild
Test: zip_test.go
Change-Id: I54b8eef9231875e6042a32c9f8bcc5c2f779922a
Add test that cover basic command line usage of soong_zip. -D
is not covered yet as the implementation will be replaced with
one that is also more easily testable in the next patch.
Bug: 116751500
Test: zip_test.go
Change-Id: I5a1bcee74ebc9cb3cf332c36f89bc12c0e807ad2
d8 and r8 were missing dependencies on jars passed as library
arguments. This normally worked because the input jar is likely
to also depend on the same jars. When the classpath was added
to d8 it started to fail on libraries that have no code but
include other static libraries.
Bug: 116840360
Test: rm out/soong/.intermediates/external/nist-sip/nist-sip/android_common/turbine-combined/nist-sip.jar && m out/soong/.intermediates/frameworks/base/ext/android_common/dex/ext.jar
Change-Id: Ie642f4a343b949778d8ee6dcc4511f3fd7633be1
d8 requires the full classpath if --min-api requires default method
or try-with-resources desugaring. Always pass the full classpath,
since it will already have been built to generate the input jar.
Bug: 116243313
Test: m checkbuild
Change-Id: Ib0c18873880697b7cf942e0548dd2c53ee5ad23c
* Allow module owner to specify a test_config_template in Android.bp
* The rule goes:
1. When "test_config" is set, Soong uses specified test config
2. If 1 is not true, check if "AndroidTest.xml" exist in the
directory, if so, use "AndroidTest.xml
3. If 1 and 2 are not true, check if "test_config_template" is set.
If so, use module specific template to generate test config
4. Otherwise, use Soong default template for test config for autogen
Bug: 113359343
Test: make
Change-Id: I9fb4b2b266be9e0c7cf23da4a51e1c8ae67cd857
This reverts commit 08e28abc4e.
Reason for revert: inserts extra ../../ entries in the zip file.
Bug: 116737386
Change-Id: I048f94889a66fe618058e37a5827d0cf6b1a6b68
This works like the existing annotation merging support, but uses a
different flag, because the merging needs to happen earlier in
metalava (see the other change in this topic).
Bug: 115746226
Test: `make api-stubs-docs`
Test: `make core-platform-api-stubs` with local modifications to trigger this path
Change-Id: I30d6d7993e06b105fb3e9fcefde39c1bf3da998a
Add comment to provide some cautions in case of we make some changes on
the jdiffdocZip name in the future.
Test: N/A
Bug: b/116221385
Change-Id: I3b612d50465f7feb87bc26ef81e692bf72d6f98f
-f and -D arguments can now take globs in the Soong format.
Also update the use of soong_zip that jars resources to escape the
globs in the arguments, and then shell-escape them when writing to
the rsp file so the glob escape are not intepreted by ReadRespFile.
Also remove an unused argument to the buildAAR rule that could
have contained values that needed escaping.
Test: m checkbuild
Change-Id: I7f20bb169dc01f952d2a7681ec6ee9c05737ed37