Commit Graph

22167 Commits

Author SHA1 Message Date
Paul Duffin
c0bb45605d java_sdk_library: Delegate component module to naming scheme am: 1b1e8069ec am: 4fc05862d6
Change-Id: Id61c950ddb4607691951371c972985e503a020a1
2020-05-13 08:43:28 +00:00
Paul Duffin
29cba10756 java_sdk_library: Extract child module naming to common struct am: c3091c8c19 am: edcb7f889e
Change-Id: Ie7d6bb07746c1fbe77ac42aa7a7b26534e208c61
2020-05-13 08:43:21 +00:00
Paul Duffin
7421be5e53 java_sdk_library: Allow separate api/stubs source modules am: 0ff08bdb07 am: 4f7962e268
Change-Id: I8475dc1ae5cad4d036fa16616daf149941a96d45
2020-05-13 08:43:17 +00:00
Paul Duffin
4fc05862d6 java_sdk_library: Delegate component module to naming scheme am: 1b1e8069ec
Change-Id: I3fbe8b22d55136c2dfd0ad2713ca495416c265bb
2020-05-13 08:32:37 +00:00
Paul Duffin
edcb7f889e java_sdk_library: Extract child module naming to common struct am: c3091c8c19
Change-Id: Ideb0faf635aac8bad39e70360987b3c8e1c73b7e
2020-05-13 08:32:25 +00:00
Paul Duffin
4f7962e268 java_sdk_library: Allow separate api/stubs source modules am: 0ff08bdb07
Change-Id: If70a36168d75fc432ebe913b772820739838885f
2020-05-13 08:32:22 +00:00
Treehugger Robot
8bd96e8c7e Merge "java_sdk_library: Preserve sdk_version: "none" in snapshot" am: fced20c3b4 am: 56730409dd
Change-Id: I8561184ff769a20f44e8c5399ee94c78c731f177
2020-05-13 08:01:16 +00:00
Treehugger Robot
c13cd601e8 Merge "Allow sdk_version: "none" to be used in prebuilts/" am: 46c907627b am: 16574cdea8
Change-Id: I0eda60684cd36ebd4174a26fbef8f03f05e0e2c1
2020-05-13 08:01:09 +00:00
Treehugger Robot
aaf54ecb48 Merge "Enable api_lint in java_sdk_library" am: c0320878e6 am: 3bab3bd9d1
Change-Id: I693e9857ec13ba1e553df6d04f1c0b5d275f1d8b
2020-05-13 08:01:01 +00:00
Paul Duffin
1b1e8069ec java_sdk_library: Delegate component module to naming scheme
Adds a naming scheme abstraction to which the java_sdk_library/import
will delegate the task of creating the names of their component
modules. The naming scheme can be selected in a module definition but
for now the only supported option is "default".

Test: m nothing
Bug: 155480189
Change-Id: I708657661188ea4a14a4dd8c6bc4b46237bbe5e0
2020-05-13 08:52:56 +01:00
Paul Duffin
c3091c8c19 java_sdk_library: Extract child module naming to common struct
Extracts the child module naming to the commonToSdkLibraryAndImport
struct so it can be reused by both sdk library source and prebuilt.

Also:
* Makes all child module name generation go through the common struct.
* Renames some of the methods to clarify their purpose and improve
  consistency.

Test: m nothing
Bug: 155480189
Change-Id: I9be9aab07252b491ab292b8847138a93b487cf53
2020-05-13 08:52:56 +01:00
Paul Duffin
0ff08bdb07 java_sdk_library: Allow separate api/stubs source modules
The API file for a scope represents the differences between the API
provided by that scope and that provided by the scope that it extends.
On the other hand the stubs source for a scope represents the union of
the API provided by the scope and the scope it extends (all the way
back to public).

Unfortunately, while metalava supports this behavior for scopes that
extend public (e.g. system and test) it does not support this behavior
for scopes that extend others, e.g. module_lib which extends system.
This is because it always assumes that the baseline for the API file
is 'public' and so has no way to defined other baselines.

This change works around that by having separate droidstubs modules to
generate the API and stubs sources for scopes that require different
arguments to generate the API and stubs sources.

Test: m checkapi
Bug: 155164730
Change-Id: Iea7d59852d7aeb503120acf3c44e08eb0d9d07b9
2020-05-13 08:52:53 +01:00
Treehugger Robot
56730409dd Merge "java_sdk_library: Preserve sdk_version: "none" in snapshot" am: fced20c3b4
Change-Id: Ib05702864a77799d5abd84f7fe4dde651eb886b6
2020-05-13 07:50:13 +00:00
Treehugger Robot
16574cdea8 Merge "Allow sdk_version: "none" to be used in prebuilts/" am: 46c907627b
Change-Id: Ifaced0e5a8913b3b95aa469a05c68334037c3de8
2020-05-13 07:50:07 +00:00
Treehugger Robot
3bab3bd9d1 Merge "Enable api_lint in java_sdk_library" am: c0320878e6
Change-Id: I220f6816c84ae4f412442bfd91a3c2f331ac45d7
2020-05-13 07:49:55 +00:00
Treehugger Robot
fced20c3b4 Merge "java_sdk_library: Preserve sdk_version: "none" in snapshot" 2020-05-13 07:36:43 +00:00
Treehugger Robot
46c907627b Merge "Allow sdk_version: "none" to be used in prebuilts/" 2020-05-13 07:36:04 +00:00
Treehugger Robot
c0320878e6 Merge "Enable api_lint in java_sdk_library" 2020-05-13 07:35:15 +00:00
TreeHugger Robot
8bfac1dc94 [automerger skipped] Merge "Add test_mainline_modules to the auto-gen test config(GTest only)." into rvc-dev am: a7a30b63e9 -s ours
am skip reason: Change-Id I31d6dfbb71881d7a7026cf2f36ba6ca6a97870ad with SHA-1 1e3fdcd182 is in history

Change-Id: If30e2351ce5d8e2bbea861d4f32dc34325eaaf0b
2020-05-13 03:33:56 +00:00
TreeHugger Robot
a7a30b63e9 Merge "Add test_mainline_modules to the auto-gen test config(GTest only)." into rvc-dev 2020-05-13 03:20:42 +00:00
Colin Cross
b85063c64a Merge "Revert "enforce sdk_version for JNI libs for updatable APKs"" am: 2bdf0da9e7 am: 6e55eb8f69
Change-Id: I88b97cb5794aa17ebf11903847e0f57f8517f6ad
2020-05-13 01:55:38 +00:00
Colin Cross
6e55eb8f69 Merge "Revert "enforce sdk_version for JNI libs for updatable APKs"" am: 2bdf0da9e7
Change-Id: If534a74d40bb852c8f2ac58670e8468c496c58f5
2020-05-13 01:40:37 +00:00
Colin Cross
2bdf0da9e7 Merge "Revert "enforce sdk_version for JNI libs for updatable APKs"" 2020-05-13 01:26:25 +00:00
Jooyung Han
cc928d9059 Revert "enforce sdk_version for JNI libs for updatable APKs"
This reverts commit 98c4750f39.

Reason for revert: broken builds

Change-Id: Icd3a9e226ff8ff288b682757cded9f43069ebc5e
2020-05-13 01:22:56 +00:00
Treehugger Robot
58461c4a42 Merge "enforce sdk_version for JNI libs for updatable APKs" am: 1852b586bf am: 548c377bee
Change-Id: Icb9cd88d908d28eebd89d25429b64fc30faf60bb
2020-05-13 01:22:49 +00:00
Treehugger Robot
548c377bee Merge "enforce sdk_version for JNI libs for updatable APKs" am: 1852b586bf
Change-Id: I84d7039417a5c518659f044055cf86a85c506576
2020-05-13 01:06:36 +00:00
Treehugger Robot
1852b586bf Merge "enforce sdk_version for JNI libs for updatable APKs" 2020-05-13 00:57:34 +00:00
Treehugger Robot
c589305e8d Merge "Add support for the remote execution of Abi links." am: c81f967ddd am: e1d817f150
Change-Id: I8a276845427bab7ad7f2135672ac39e291944eb9
2020-05-12 22:00:25 +00:00
Treehugger Robot
e1d817f150 Merge "Add support for the remote execution of Abi links." am: c81f967ddd
Change-Id: I39f20b3527c3cdae74b2c73674eba14bf49af752
2020-05-12 21:46:27 +00:00
Treehugger Robot
c81f967ddd Merge "Add support for the remote execution of Abi links." 2020-05-12 21:35:43 +00:00
Stephen Hines
b99c9d52e2 Default to zero-initialization instead of pattern. am: 7871416eec am: a6ca70a374
Change-Id: I79affb3afb753859a38002a1b560d0876f8dfa87
2020-05-12 19:44:24 +00:00
Stephen Hines
a6ca70a374 Default to zero-initialization instead of pattern. am: 7871416eec
Change-Id: Ide57a1b64926a22c23cc2e83552820954aeaaa4a
2020-05-12 19:27:48 +00:00
Paul Duffin
780c5f4715 java_sdk_library: Preserve sdk_version: "none" in snapshot
Test: m nothing
Bug: 156354511
Change-Id: Icf7c20dc109a773430768c1a2d91c674551dbc1b
2020-05-12 15:52:55 +01:00
Paul Duffin
e5c3b85ee5 Allow sdk_version: "none" to be used in prebuilts/
Bug: 156354511
Test: m nothing
Change-Id: Iffce78cbce88a8341146bf19e78acf25fc69f2b0
2020-05-12 15:33:52 +01:00
Paul Duffin
c7042f34b4 [automerger skipped] Defer \n quoting generatedContents until creating the ninja rule am: ece64f6de0 -s ours
am skip reason: Change-Id I768c3b96ed08a3daf251730e2a10d9d72338c49a with SHA-1 1110827b3f is in history

Change-Id: Iaf02254b48dd9140e0a93a6fff1d8726799d01eb
2020-05-12 12:42:19 +00:00
Stephen Hines
7871416eec Default to zero-initialization instead of pattern.
Bug: http://b/154169005
Test: Built blueline and ran some CTS tests.
Change-Id: Ie5e45619096cdcd0b52d01ece65e7f0233b2a3c8
2020-05-12 01:10:38 -07:00
Paul Duffin
2649cdf267 [automerger skipped] Merge changes I4e1861ea,Ic99b7333 into rvc-dev am: ddbb19648e -s ours
am skip reason: Change-Id I4e1861ea67f441f2948a0d7d7053ab0b1169955f with SHA-1 c878250d3f is in history

Change-Id: Iaa32a369f0fa11be6d712a2fa6782e602ab2f14f
2020-05-12 07:18:23 +00:00
Paul Duffin
ece64f6de0 Defer \n quoting generatedContents until creating the ninja rule
Previously, when writing to generatedContents \n characters were
quoted (replaced with \\n) so as to allow them to be preserved through
ninja/rsp/bash and were unquoted (replaced \\n with \n) just before
redirecting to the output file. That meant that any code which wanted
to access the contents for other purposes, e.g. testing had to unquote
\\n.

This change moves the quoting to be part of the code that generates the
ninja rule which simplifies any other code that has to access the
contents.

Without quoting the generated Android.bp files are not formatted
properly, are all on one line and completely unreadable.

Bug: 156286550
Test: m art-module-sdk and check generated Android.bp file to make sure
      it is properly formatted.
Merged-In: I768c3b96ed08a3daf251730e2a10d9d72338c49a
Change-Id: I768c3b96ed08a3daf251730e2a10d9d72338c49a
(cherry picked from commit 1110827b3f)
2020-05-12 08:04:57 +01:00
Paul Duffin
ddbb19648e Merge changes I4e1861ea,Ic99b7333 into rvc-dev
* changes:
  java_sdk_library: Path extraction from deps depend on tag
  Expand SystemApi annotation for generating system api
2020-05-12 07:02:44 +00:00
Treehugger Robot
7d053060f1 Merge "Add test_mainline_modules to the auto-gen test config(GTest only)." am: b67b9a416e am: 4fd48ce4a6
Change-Id: I0c33299fe24ce901c3accd3cf3b79cf6b4d80ca7
2020-05-12 05:04:29 +00:00
Treehugger Robot
4fd48ce4a6 Merge "Add test_mainline_modules to the auto-gen test config(GTest only)." am: b67b9a416e
Change-Id: I71b08ec0614073ce4642762514228cdaf5a75bdf
2020-05-12 04:46:50 +00:00
Treehugger Robot
c6e48b7dad Merge "Add sourcepath to inputs of remoteable metalava action." am: e72da7f63c am: 0452efbd16
Change-Id: Ib78a89ee437500a6f347d0c746bb56fae97e4a15
2020-05-12 04:41:37 +00:00
Treehugger Robot
b67b9a416e Merge "Add test_mainline_modules to the auto-gen test config(GTest only)." 2020-05-12 04:35:17 +00:00
Treehugger Robot
0452efbd16 Merge "Add sourcepath to inputs of remoteable metalava action." am: e72da7f63c
Change-Id: Ifd64c3270f7acc2f26644d6b35cc748b6e090cf8
2020-05-12 04:27:58 +00:00
Treehugger Robot
e72da7f63c Merge "Add sourcepath to inputs of remoteable metalava action." 2020-05-12 04:15:16 +00:00
Yo Chiang
adc834ae1b Merge "Register ALL_MODULES subvars with my_register_name" am: bcaea49d24 am: a182196375
Change-Id: I6aee735b3dbcd7dd2ba221e65baf6cd9a37bc1f9
2020-05-12 03:29:57 +00:00
Yo Chiang
a182196375 Merge "Register ALL_MODULES subvars with my_register_name" am: bcaea49d24
Change-Id: Ia25dc5a0bcdc57c7df7bc976d6d20e064bf27794
2020-05-12 03:18:59 +00:00
Yo Chiang
bcaea49d24 Merge "Register ALL_MODULES subvars with my_register_name" 2020-05-12 03:09:20 +00:00
Treehugger Robot
94875a1f5a Merge "Defer \n quoting generatedContents until creating the ninja rule" am: 0a5dae117b am: 2edcea914c
Change-Id: I9464f946ff3ecddeb17e9c9f0aaf86bf1282dcbc
2020-05-12 03:06:44 +00:00
Treehugger Robot
2edcea914c Merge "Defer \n quoting generatedContents until creating the ninja rule" am: 0a5dae117b
Change-Id: I7ef8e56f3d0b6bad7392c21121f6a22084c14271
2020-05-12 02:54:40 +00:00