Commit Graph

2186 Commits

Author SHA1 Message Date
Paul Duffin
12ceb4699b java_sdk_library: support system_modules properly
Bug: 145998881
Test: m checkbuild
Change-Id: Ia7663dca4b0ce84fe6dafca27e1aeb1bcda86221
2020-01-02 15:38:20 +00:00
Paul Duffin
37e0b77e3b java_sdk_library: Avoid generating system and test .txt files
If the library does not provide system and test APIs then do not
generate/require corresponding .txt files.

Bug: 145998881
Test: m checkbuild
Change-Id: I21cfdb0b63fd575e8c8c63ea2b436e0c4aa8f3fc
2020-01-02 15:38:18 +00:00
Automerger Merge Worker
07cdf35920 Merge "java_sdk_library: construct droidstubs args as []string" am: 0a83b7961c am: bc1aa20ebb am: cd8b9a20f2
Change-Id: Ia8f52cdfb94aa3729ecb97ed730107f7cd4f4d34
2020-01-02 15:08:05 +00:00
Paul Duffin
c4cea76c0d java_sdk_library: Rename createDocs to createStubsSources
The createDocs(...) method was obviously named because it created a
droiddocs target that generated the stubs source but it now creates a
droidstubs target so the name was misleading.

Bug: 145998881
Test: m checkbuild
Change-Id: I7419b0a01ee87ecb2b396e4817e5e88a88a8b7b6
2020-01-02 14:56:00 +00:00
Paul Duffin
03fbd786b5 java_sdk_library: Remove unused stubsLibraryDependencyTag
Bug: 145998881
Test: m checkbuild
Change-Id: I3ce0fa498c261a9a1f0382f6d548bb070a656358
2020-01-02 14:55:27 +00:00
Treehugger Robot
0a83b7961c Merge "java_sdk_library: construct droidstubs args as []string" 2020-01-02 14:34:06 +00:00
Automerger Merge Worker
2828cebddc Add support for java_test in sdk am: 1b82e6a108 am: c520a1723c am: 38c5a8c468
Change-Id: I758b0d1b8b70bede7a726960c53babcc2071334c
2020-01-02 11:31:54 +00:00
Jiyong Park
114ff53f5e m <apex_name>-deps-info prints the internal/external deps of the APEX
We need to have a way to see the list of modules that directly or
indirectly contribute to an APEX. People find it difficult to determine
whether a module is included in which APEXes because APEX tracks
indirect dependencies as well as direct dependencies. Therefore, just
looking at Android.bp for the APEX itself doesn't give the answer.

This change adds a new make target <apex_name>-deps-info, which
generates out/soong/<apex_name>-deps-info.txt file that shows the
internal and external dependencies of the said APEX.
Here, internal means the dependencies are actually part of the
APEX, while external means the dependencies are still external to the
APEX.

Bug: 146323213
Test: m (apex_test amended)
Change-Id: I33d1ccf5d1ca335d71cd6ced0f5f66b8c3886d13
2020-01-02 09:41:30 +09:00
Automerger Merge Worker
585928fc5d Restrict SdkMemberTypes that can be used with sdk/sdk_snapshot am: e602918294 am: b39c226ff7 am: 5f7e9a061b
Change-Id: I1b7d00af424d786c1f166f7d93776ff65278899e
2019-12-31 20:33:16 +00:00
Paul Duffin
e602918294 Restrict SdkMemberTypes that can be used with sdk/sdk_snapshot
By default SdkMemberTypes are only supported on module_exports module
type. Support for sdk module type has to be explicitly specified.

The java_header_libs, native_shared_libs and stubs_sources are
supported on sdk. The latter is required to provide the stubs source
for an API specified in java_header_libs as they should be kept in
sync.

Bug: 146341462
Test: m nothing
Change-Id: I19b9e60792780a797458d4a9e489506602b13144
2019-12-31 15:08:59 +00:00
Paul Duffin
1b82e6a108 Add support for java_test in sdk
Adds java_test_import module type for use by the sdk snapshot and
adds java_tests property to the sdk and sdk_snapshot module type.

This is needed for the conscrypt test sdk.

Bug: 143678475
Test: m nothing
Change-Id: Ied4c56c978dac2f92a9b3bc34b3235d7eeba2fd3
2019-12-31 15:08:59 +00:00
Paul Duffin
235ffffbdc java_sdk_library: construct droidstubs args as []string
Bug: 145998881
Test: m checkbuild
Change-Id: Id3eb99577200a807050dbf86f47816a2476c3d9c
2019-12-31 15:08:33 +00:00
Automerger Merge Worker
33e8d09228 Merge "Dedup generating xml file for java_sdk_library" am: 380f85edd3 am: 0fcd3e1e59 am: ef3c83de43
Change-Id: Ibfce5ab855aa13145d265e68ee9678d4aab4831a
2019-12-28 00:17:54 +00:00
Jooyung Han
624058e6a5 Dedup generating xml file for java_sdk_library
Permission XML file for java_sdk_library is generated by
java_sdk_library itself now.

And, build rule is switched to android.WriteFile since "echo -e" is
not supported from build server. (-e is printed to output)

Bug: 145474221
Test: m com.android.cronet and check its permissions xml file
     also, m org.chromium.net.cronet.xml (created dynamically)
Change-Id: Iffb119151c49bc4fe6c4386fa267cca193f37dbc
2019-12-26 12:20:24 +00:00
Automerger Merge Worker
986fe22e22 Merge "Generate .srcjar for prebuilt_stubs_sources" am: e2bc36f12c am: 954e23e3e0 am: a8d9e2ecdd
Change-Id: Ica5b34271f7c1e7854f4cc7847e653851552ef26
2019-12-23 14:02:03 +00:00
Paul Duffin
e2bc36f12c Merge "Generate .srcjar for prebuilt_stubs_sources" 2019-12-23 13:32:08 +00:00
Mathew Inwood
4d0c19c271 Singleton build rule for merged compat config.
This creates a single build artifact with all compat config from the build.

Test: m out/soong/compat_config/merged_compat_config.xml
Bug: 144927670

Change-Id: Ie60575469c22c201cf1f4d4c187c03c7212dd26b
2019-12-20 13:55:12 +00:00
Automerger Merge Worker
5232819c83 Merge "Update build rule for updated script." am: 431b8a2fdd am: 8f7dd2e8f3 am: 1ff584d604
Change-Id: Ieae5c37dd11ad4149cd37c91e1261b6285725111
2019-12-20 10:13:15 +00:00
Mathew Inwood
431b8a2fdd Merge "Update build rule for updated script." 2019-12-20 09:33:42 +00:00
Paul Duffin
9b478b0831 Generate .srcjar for prebuilt_stubs_sources
Changes prebuilt_stubs_sources to generate a .srcjar from its input
instead of just exposing the srcs it is given. This ensures that it can
be used as a drop in replacement for a droidstubs module.

Updates the test for prebuilt_stubs_sources to be more representative
of the actual use made of it by sdk snapshot which outputs a directory
not a glob pattern. Added some documentation of the
prebuilts_stubs_sources srcs property to make it clear that it is
supposed to be a set of directories.

Extracts common code from sdk/testing.go for normalizing path/paths
for testing.

Bug: 143678475
Test: m conscrypt-module-sdk conscrypt-module-host-sdk conscrypt-module-test-sdk
      unzip those in place of external/conscrypt
	  build core-current-stubs-source which expects it to provide a .srcjar.
Change-Id: I8204a022557a9b0b45e19eac79ecba98ff95213d
2019-12-20 08:13:45 +00:00
Automerger Merge Worker
74375f5bb5 Merge "Support java_sdk_library as java_libs of apex" am: 120d73fe4f am: 1d39e165f7 am: 97dd8ef8e4
Change-Id: I6c920a472d77993fbc65cda2959b9b8f26e458b3
2019-12-20 05:46:55 +00:00
Treehugger Robot
120d73fe4f Merge "Support java_sdk_library as java_libs of apex" 2019-12-20 05:16:31 +00:00
Automerger Merge Worker
4e965ebbce Merge "Improve cc tests by adding sanitizer mutators" am: 7d211f1793 am: 152b5f8675 am: 5b91dc8d39
Change-Id: Ife351bc2628c32e7473ead96097b6ebd325604ec
2019-12-20 02:50:24 +00:00
Automerger Merge Worker
504b300fc6 Merge "Dedup prebuilt mutator registration" am: 82f4f99780 am: 849e8f7509 am: e05577b9a8
Change-Id: I094959ab23674cafcc40455f5ea1c062085c75f1
2019-12-20 02:50:06 +00:00
Automerger Merge Worker
598e0885e7 Merge "Dedup registration for cc default test config" am: 24de9ea201 am: 6da6395f16 am: 1971acf840
Change-Id: Iff72ebfc46ba03e5b9a26ba04e6810f720747bc7
2019-12-20 02:48:49 +00:00
Jeff Sharkey
2123b96921 Merge "Move MediaStore.java inside APEX boundary." 2019-12-20 01:17:46 +00:00
Jooyung Han
58f26aba4e Support java_sdk_library as java_libs of apex
When a java_sdk_library module is added, both impl jar and permission
xml files are packaged together.

For example, when a java_sdk_library "foo" is listed, following two
entries will be in an APEX package.

/javalibs/foo.jar
/etc/permissions/foo.xml

Bug: 145474221
Test: m com.android.cronet
      deapexer list com.android.cronet.apex

Change-Id: If5883c02255e9309f20810b1532d3fbe73bf4e95
2019-12-20 08:50:34 +09:00
Automerger Merge Worker
0662e65654 Merge changes I7e9440a0,I7f1a4b64,If5d6fdac am: b237de1914 am: ab879385eb am: 396fd80826
Change-Id: I96741af41ba539d783787abc0b79f82caef2e5d4
2019-12-19 23:37:41 +00:00
Automerger Merge Worker
d3bc7e35ab Merge changes I982fcb8d,I17f24fe1,If5740476 am: 4326e7375c am: 22cf68dcd1 am: d8b3bb0425
Change-Id: Iae44eab1a6a654117f221b04dce62d9edd5659dd
2019-12-19 23:34:51 +00:00
Jeff Sharkey
38338a951d Move MediaStore.java inside APEX boundary.
Recent work has paved the way to get MediaStore.java building against
"core_platform", and this change is actually shifting MediaStore.java
inside the MediaProvider APEX boundary.

This involves defining a new "updatable-mediaprovider" library JAR
and ensuring that it's spliced into classpaths where needed to keep
everything building and working.

Note that the MediaProvider APK itself is still bundled, so we're
manually including the MediaStore.java when building that APK so that
we can continue referencing @hide symbols, but there's a STOPSHIP
comment to remove that once we get the APK building against
"system_current".

Bug: 144247087
Test: atest --test-mapping packages/providers/MediaProvider
Change-Id: I6d6da165848b934f4ca7ecfca7b97de6f97897e3
2019-12-19 22:16:04 +00:00
Paul Duffin
d686791c16 Improve cc tests by adding sanitizer mutators
This fixes an issue that arises when deduping cc build component
registration code.

The sanitize_runtime_deps and sanitize_runtime post deps mutators were
not previously added when running cc tests. That meant the tests were
not actually testing the same behavior as at runtime.

Adding the mutators breaks the TestFuzzTarget test as the mutator adds
libclang_rt.ubsan_standalone-aarch64-android as a dependency of libc++
and the former is not available.

This fixes the test by adding the missing dependency as a cc prebuilt
shared library.

Test: m checkbuild
Bug: 146540677
Change-Id: Ie13c7e6fcefef7d9cb1cc5364be3dc563ce40de5
2019-12-19 19:19:40 +00:00
Paul Duffin
0c4979bbdf Dedup prebuilt mutator registration
Test: m checkbuild
Bug: 146540677
Change-Id: I9f8a11adf61fe6f352ec1eabc7c5bac332348ba2
2019-12-19 19:19:40 +00:00
Paul Duffin
77980a8bb9 Dedup registration for cc default test config
The cc.GatherRequiredDepsForTest() method returns some default module
definitions that are required when using cc module types like
cc_library. Previously, the registration of the module types and
mutators needed to process those default definitions was duplicated
in the test config initialization.

This change removes that duplicated code and replaces it with calls
to cc.RegisterRequiredBuildComponentsForTest(ctx) which registers all
the required build components.

Test: m checkbuild
Bug: 146540677
Change-Id: I80b6913c5691ff164ce9d308b9e1da24940f2d42
2019-12-19 19:19:40 +00:00
Paul Duffin
43dc1cc2bc Dedup system modules and sdk library module type registration
Test: m checkbuild
Bug: 146540677
Change-Id: I982fcb8d723e8e2f7679434051ddc427d4fbd7be
2019-12-19 19:19:40 +00:00
Paul Duffin
b0f850784a Dedup java genrule module type registration
Test: m checkbuild
Bug: 146540677
Change-Id: I17f24fe145b4bb453e82aabaecc9c251f2b9769b
2019-12-19 19:19:40 +00:00
Paul Duffin
a48f758d84 Dedup prebuilt apis module type/mutator registration
Test: m checkbuild
Bug: 146540677
Change-Id: If5d6fdace2574df6314fbcf6441838cd11df58ae
2019-12-19 19:19:40 +00:00
Paul Duffin
884363e782 Dedup droiddoc module type registration
Some tests were changed as they were using the wrong name for the
droiddoc_exported_dir module type.

Test: m checkbuild
Bug: 146540677
Change-Id: If57404760d2df3757c93e237696359355cf0c96e
2019-12-19 19:19:40 +00:00
Automerger Merge Worker
8b60190dc5 Merge "Revert "Consistently use either "boot" or "apex" boot image as the default."" am: 18577fe8fb am: cbb1de50d6 am: 4f5b495732
Change-Id: Ia00232e849ad035dc6d54059a906cc2bcce7bf17
2019-12-19 18:42:13 +00:00
Jiyong Park
f3273c5587 Merge "Add updatable_media_stub to framework" 2019-12-19 18:04:54 +00:00
Lingfeng Yang
18577fe8fb Merge "Revert "Consistently use either "boot" or "apex" boot image as the default."" 2019-12-19 17:24:27 +00:00
Lingfeng Yang
54191fae42 Revert "Consistently use either "boot" or "apex" boot image as the default."
This reverts commit 48b3b3c71f.

Reason for revert: breaks emulator

BUG: 146558375

Change-Id: I2af3d11ad9a014b0d73a73540bc814f245bc6418
2019-12-19 16:41:40 +00:00
Automerger Merge Worker
f4353299a7 Merge "Dedup registration code for module types and singletons" am: 65b174c9c7 am: dffc72bf4e am: 418ee6e2ff
Change-Id: Iff6b4842cf433acdb6674b175023aa964533f64e
2019-12-19 16:08:56 +00:00
Treehugger Robot
65b174c9c7 Merge "Dedup registration code for module types and singletons" 2019-12-19 15:38:25 +00:00
Automerger Merge Worker
8f95562c8e Merge "Consistently use either "boot" or "apex" boot image as the default." am: 13c929e32e am: 292aed498c am: 9d148def53
Change-Id: Ibad33176769845d82e5eabf29fc5f5f71e619e86
2019-12-19 12:17:16 +00:00
Ulyana Trafimovich
13c929e32e Merge "Consistently use either "boot" or "apex" boot image as the default." 2019-12-19 10:22:01 +00:00
Paul Duffin
f9b1da0fcb Dedup registration code for module types and singletons
The registration of module types and singletons is duplicated between
init() functions that register them for use in the build runtime and
test context creation code that registers them for testing.

This is a proof of concept for a mechanism that will allow the code
to be shared. It defines a RegistrationContext interface that is
implemented by both the TestContext and the new initRegistrationContext
type. An instance of the the latter is available through the
InitRegistrationContext variable.

The intent is that the registration of the module types and singleton
types will be extracted from the init() function into a separate
function that takes a RegistrationContext parameter. That method is
called from init() passing in the InitRegistrationContext and from a
test passing in the TestContext. Something like this:

  func init() {
    RegisterBuildComponents(android.InitRegistrationContext)
  }

  func RegisterBuildComponents(ctx android.RegistrationContext) {
    ctx.RegisterModuleType(....)
    ....
  }

A test would do something like this:

  ctx := android.NewTestContext()
  RegisterBuildComponents(ctx)

Test: m nothing
Change-Id: I97173cabb6d6cf7ce98fdb5f73418438b1997b35
2019-12-19 10:09:53 +00:00
Automerger Merge Worker
b5aeec76a3 Merge "Merge multiple compat_config.xml's." am: b4cc0206bb am: a0f21a5a4f am: 9ada41ec20
Change-Id: I19876d52dfe47ee3616fb8f7c5be7ce33fc44ae2
2019-12-19 08:44:40 +00:00
Mathew Inwood
0dd06f6ff2 Update build rule for updated script.
The script now expects flags for filenames and no longer
just writes to stdout. Write full merged config too.

Test: m libcore-platform-compat-config
Change-Id: Ia524a8c271725665772c9543baecd4f494ee86f1
2019-12-19 08:27:33 +00:00
Mathew Inwood
b4cc0206bb Merge "Merge multiple compat_config.xml's." 2019-12-19 08:11:09 +00:00
Automerger Merge Worker
31093e63fd Merge "Revert submission 1194828-revert-1191937-art_apex_available-DWXQGTKMAR" am: aa21599d5d am: c945626671 am: a2dcda829a
Change-Id: Ibe327762165d8848eec14c016121babd47558219
2019-12-19 05:31:55 +00:00