Commit graph

20146 commits

Author SHA1 Message Date
Elliott Hughes
9912ee2f02 Remove reference to libz_current.
This no longer exists.

Bug: https://issuetracker.google.com/155351357
Test: treehugger
Change-Id: Ie38c971759acb0141cba6341f95c67effadd93a6
2020-05-13 14:20:12 -07:00
Stefano Galarraga
39fa1882ac Revert "Default to zero-initialization instead of pattern."
This reverts commit 7871416eec.

Reason for revert: This change is breaking CtsNNAPITestCases.TensorRankConstraint (http://b/156464649). 

Change-Id: I8831993a7d3c2079a8d76a23dfbdf9c7c1543181
2020-05-13 20:09:28 +00:00
Paul Duffin
38b5785e3f java_sdk_library_import: Propagate prefer to child modules
Bug: 155164730
Test: m nothing
Change-Id: Idb06d79baf346ac570beada79880814c5ef6bb50
2020-05-13 20:40:53 +01:00
Paul Duffin
f7a6433bab java_sdk_library: Propagate naming_scheme to snapshot
Bug: 155164730
Test: m nothing
Change-Id: Iec7c52d2102b6294540090f3c1e32bd9d8cc7da8
2020-05-13 20:40:53 +01:00
Colin Cross
c2d24050c5 Don't use SDK variant for vendor JNI libraries
Vendor JNI libraries already have stable APIs enforced by the VNDK,
they shouldn't use SDK variants.

Bug: 156225490
Test: TestJNISDK
Change-Id: I21ba67e8e9fb05016caf5888129adc1a939545c2
2020-05-13 11:10:38 -07:00
Liz Kammer
1c14a21994 Add test data dependencies to APEX.
Test: soong go tests

Bug: 155820504
Change-Id: If96d82c27f19953e34efb31f2111f1643c0c4008
2020-05-13 10:17:30 -07:00
Dan Shi
c022ff15b1 Merge "Use StopServicesSetup to stop/start framework." am: 61b5e26f27
Change-Id: I7d2292a57e882c1e80235e49dc333629a56f9481
2020-05-13 16:29:23 +00:00
Paul Duffin
e04ce887d2 java_sdk_library: Add sdk_version for API scopes am: 87a05a389d
Change-Id: I845dd9c0fcbde173cec1a6ecbc7301b6fd7b98cc
2020-05-13 16:29:07 +00:00
Dan Shi
61b5e26f27 Merge "Use StopServicesSetup to stop/start framework." 2020-05-13 16:19:07 +00:00
Jooyung Han
bbc3fb780b Reland "enforce sdk_version for JNI libs for updatable APKs"
JNI libs for "updatable" APKs or APKs in "updatable" APEXes should set
sdk_version which is equal to or less than APK's min_sdk_version.

In fact, we'd better check if min_sdk_version of JNI libs matches(or is
earlier than) min_sdk_version of the APK. But for now the build system
can't handle sdk_version/min_sdk_version correctly for JNI libs. That's
why sdk_version of JNI libs is enforced to match with min_sdk_version
of APK in this change.

(original commit: 98c4750f39)

Bug: 145796956
Test: m
Change-Id: I08543ccee7dfda0559a1fca108ceb5c28f84943f
2020-05-14 00:19:45 +09:00
Paul Duffin
87a05a389d java_sdk_library: Add sdk_version for API scopes
Allow the sdk_version against which the stubs for a scope are compiled
to be specified in the module on a per scope basis.

Bug: 155164730
Test: m nothing
Change-Id: I5881e5ee7c2169c30f544882344a60a602dae917
2020-05-13 13:09:23 +01:00
Treehugger Robot
5c9c0e79e0 Merge "Remove unused Module.visibility() method" am: 717e50c630
Change-Id: I25746735f0a7ab6219888925d106291c66d064b8
2020-05-13 12:04:47 +00:00
Treehugger Robot
290ae01f42 Merge "Add //visibility:override to allow control over inheritance" am: 5bc07e59e3
Change-Id: I7e73f5a0fb5a1a6665b80aa8b3bdcb3bf4ae8199
2020-05-13 12:04:39 +00:00
Treehugger Robot
717e50c630 Merge "Remove unused Module.visibility() method" 2020-05-13 11:53:49 +00:00
Treehugger Robot
5bc07e59e3 Merge "Add //visibility:override to allow control over inheritance" 2020-05-13 11:53:43 +00:00
Paul Duffin
35dd087ac2 java_sdk_library: Add framework-modules naming scheme am: 6c9c5fc4bc
Change-Id: I0621e83f790a5aa9458e9d24d4e5bcdcfba96c49
2020-05-13 08:32:45 +00:00
Paul Duffin
04e787a74a java_sdk_library: Remove some almost single use constants am: dd9d0740fa
Change-Id: Ic042f2e06d833d5487c90fb5b74949939f632749
2020-05-13 08:32:39 +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
Paul Duffin
6c9c5fc4bc java_sdk_library: Add framework-modules naming scheme
Matches the naming scheme used by the separate manually created modules
that will be replaced by java_sdk_library's automatically created
components. This will simplify conversion to java_sdk_library as it
will allow developers to concentrate on getting the conversion correct
without also having to worry about name changes. It will also allow the
conversions to be parallelized as many of the references to the
components are in places where conflicts are likely.

Test: m nothing
Bug: 155480189
Change-Id: Ic859a61de155b3e582c17f6ab5e9298f5f4e709a
2020-05-13 08:52:56 +01:00
Paul Duffin
dd9d0740fa java_sdk_library: Remove some almost single use constants
The constants are only used in one place in the code and in the test.
This change switches the test code to use the apiScope methods to
generate the names and then inlines the constants in those methods. It
makes it easier to see the naming convention.

Test: m nothing
Bug: 155480189
Change-Id: I966e82b8ae67624da168e05f5a2b062b832cb8cd
2020-05-13 08:52:56 +01: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
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
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
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
Dan Shi
8aa401023b Use StopServicesSetup to stop/start framework.
Bug: 155774142
Test: atest VtsHalWifiV1_2TargetTest (update Android.bp with
disable_framework: true)

Change-Id: I5d5326f415352d50ace7f456d29b257d1d769318
2020-05-12 13:54:49 -07: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
36c5b8d0b8 Remove unused Module.visibility() method
Bug: 155787200
Test: m nothing
Change-Id: Iee7a9ab9d816ed1948e2c7cde23f9907cfda337d
2020-05-12 20:07:46 +01:00
Paul Duffin
51084ff6cf Add //visibility:override to allow control over inheritance
Visibility rules can be 'inherited' in one of two ways. Either from
defaults or from a module that called ctx.CreateModule(...).
Previously, in both cases the inheriting module could only append
additional visibility rules to the end of the inherited rules. That
made it impossible to restrict the visibility by removing or ignore
inherited rules.

The //visibility:override rectifies that by allowing the inheriting
module to ignore all the rules that they would have inherited. It can
only go at the beginning of a list of rules specified in a module but
after defaults are applied it can end up in the middle of a list of
rules. In that case it behaves as if all the rules up to and including
the //visibility:override rule were discarded.

It can be used with //visibility:private to override
//visibility:public and vice versa.

Bug: 155787200
Test: m nothing
Change-Id: I8a9c9c5a1bdceaee387c08864ae2b34629e0d46f
2020-05-12 20:07:46 +01: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
Ulya Trafimovich
8640ab9c26 Raise an error instead of panic in SplitApexJarPairs.
Test: aosp_walleye-userdebug boots
Change-Id: I9a1c4ec5c8862b1936820b3cee6db9a85015cb0e
2020-05-12 12:27:50 +01:00
Paul Duffin
f88d8e032f Syntax check generated Android.bp snapshot
Checks the syntax of the Android.bp file generated for the sdk
snapshot. While this will not detect all possible problems with the
generated Android.bp file it will detect some and it is far better to
detect those issues during generation than when it is unpacked and
used.

Bug: 155628860
Test: m nothing
Change-Id: Ieec86a7a49fa2e3bd8b9f83aca540114232a3476
2020-05-12 09:52:41 +01: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
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
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