Commit Graph

43590 Commits

Author SHA1 Message Date
satayev
09a45d755f Merge "VNDK APEX: skips VNDK-Ext" am: 17c4507dec am: 125bba00cf
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1744554

Change-Id: Ic32f9b3df65b747e5126a50d65b472f4fe3df9df
2021-06-23 20:24:59 +00:00
satayev
125bba00cf Merge "VNDK APEX: skips VNDK-Ext" am: 17c4507dec
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1744554

Change-Id: I316bb6290888450283e7a492deba1ee74a34b084
2021-06-23 20:07:39 +00:00
satayev
17c4507dec Merge "VNDK APEX: skips VNDK-Ext" 2021-06-23 19:52:56 +00:00
Paul Duffin
a063a7946c [automerger skipped] Add commonSdkLibraryAndImportModule interface am: 3accbb5446 -s ours
am skip reason: Merged-In I7a469ae03ea5c19922200284da08a9ae38a46751 with SHA-1 71b33cca9d is already in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/15080377

Change-Id: I5b3333421d65afab1508a2505b1f63b8f7e0ccab
2021-06-23 18:59:15 +00:00
Paul Duffin
1491087dbb Merge "Output bootclasspath_fragment's fragments property to sdk snapshot" am: 94b51488d9 am: c7a0512670
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1742967

Change-Id: I81ab059b6cf18ea19933fd7acf50187d91f32494
2021-06-23 18:35:28 +00:00
Paul Duffin
c7a0512670 Merge "Output bootclasspath_fragment's fragments property to sdk snapshot" am: 94b51488d9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1742967

Change-Id: Iea9862952e1c04ffa44f5929ff712123716d1694
2021-06-23 18:02:47 +00:00
Paul Duffin
94b51488d9 Merge "Output bootclasspath_fragment's fragments property to sdk snapshot" 2021-06-23 17:47:49 +00:00
Jooyung Han
73a471ea9b Merge "fix: comparison between min_sdk_version" am: 91913e3e07 am: bdafb79af7
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1743953

Change-Id: Id481769c8852103cb3690911e44d103b0f9cbe6a
2021-06-23 17:34:59 +00:00
Jooyung Han
bdafb79af7 Merge "fix: comparison between min_sdk_version" am: 91913e3e07
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1743953

Change-Id: I25972204c1f00ab438d28663d56ddde104c78555
2021-06-23 17:20:08 +00:00
Jooyung Han
91913e3e07 Merge "fix: comparison between min_sdk_version" 2021-06-23 17:02:02 +00:00
Jooyung Han
7d6e79bc63 VNDK APEX: skips VNDK-Ext
In legacy VNDK mode (DeviceVndkVesion=""), the check was missing. We
don't want VNDK-Ext in VNDK APEX in any case.

Bug: 191770320
Test: m nothing
Change-Id: I08f36a4c1696bf82d25d629841e172d2716a366d
2021-06-24 01:56:03 +09:00
Paul Duffin
3accbb5446 Add commonSdkLibraryAndImportModule interface
The commonSdkLibraryAndImportModule defines the methods that a module
which embeds the commonToSdkLibraryAndImport struct need to provide.

Bug: 179354495
Test: m nothing
Merged-In: I7a469ae03ea5c19922200284da08a9ae38a46751
Change-Id: I7a469ae03ea5c19922200284da08a9ae38a46751
(cherry picked from commit 71b33cca9d)
2021-06-23 17:46:50 +01:00
Paul Duffin
51227d875b Output bootclasspath_fragment's fragments property to sdk snapshot
Adds support for printing a PropertySet that has a property whose value
is an array of structs.

Bug: 179354495
Test: m nothing
      m conscrypt-module-sdk
      - check generated Android.bp file
Change-Id: I71be04188465610bcbea4d3c9a5e8204171a1eeb
2021-06-23 17:12:31 +01:00
Paul Duffin
b7a9ecd996 Merge "Add commonSdkLibraryAndImportModule interface" am: 2afa8915bb am: c461d90f18
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1744313

Change-Id: Ieb4124174daeb033d9faa388fe193d19c2d0fd85
2021-06-23 16:08:29 +00:00
Paul Duffin
c461d90f18 Merge "Add commonSdkLibraryAndImportModule interface" am: 2afa8915bb
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1744313

Change-Id: I76a17fce582e0484ed1a1f8eb0070a2b7ea93e8e
2021-06-23 15:50:09 +00:00
Paul Duffin
2afa8915bb Merge "Add commonSdkLibraryAndImportModule interface" 2021-06-23 15:36:36 +00:00
Paul Duffin
71b33cca9d Add commonSdkLibraryAndImportModule interface
The commonSdkLibraryAndImportModule defines the methods that a module
which embeds the commonToSdkLibraryAndImport struct need to provide.

Bug: 179354495
Test: m nothing
Change-Id: I7a469ae03ea5c19922200284da08a9ae38a46751
2021-06-23 11:50:08 +01:00
satayev
c92cff4f0d Merge "Append platform classpath proto configs with missing apex jars." am: a580b5ef0f am: f8f2d7b4e8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1739054

Change-Id: I825921148500db99b1f8a0fb3f6acadba2d023ac
2021-06-23 10:27:01 +00:00
satayev
f8f2d7b4e8 Merge "Append platform classpath proto configs with missing apex jars." am: a580b5ef0f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1739054

Change-Id: I09a428d4f9a2c88b7fd78b6e5c4cc19a99acf9a2
2021-06-23 10:11:04 +00:00
satayev
a580b5ef0f Merge "Append platform classpath proto configs with missing apex jars." 2021-06-23 09:51:39 +00:00
Paul Duffin
a907f49484 Merge "Refactor the printing of an sdk snapshot's Android.bp contents" am: e59cad2089 am: 7210d02ad2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1742966

Change-Id: I99cfe95a6179842ed6a73d8353866057ef9d1e54
2021-06-23 09:51:23 +00:00
Paul Duffin
7210d02ad2 Merge "Refactor the printing of an sdk snapshot's Android.bp contents" am: e59cad2089
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1742966

Change-Id: Ia1389619734eaad926e34132cb4140763bb1f62a
2021-06-23 09:38:19 +00:00
Paul Duffin
e59cad2089 Merge "Refactor the printing of an sdk snapshot's Android.bp contents" 2021-06-23 09:20:22 +00:00
Paul Duffin
e867b923da [automerger skipped] Add test for sdk that contains overlapping members am: 0e7bb0e80a -s ours
am skip reason: Merged-In Ifdc1b4a5a7968db2ded3fdb7eb02f9cff77c7c3f with SHA-1 3302871b7d is already in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/15063349

Change-Id: I42390967ef853737e2198d2c10c5cde17dd26595
2021-06-23 09:17:36 +00:00
Paul Duffin
9edaf9f84c [automerger skipped] Remove unused apiModuleName am: 0b5a143c32 -s ours
am skip reason: Merged-In Id1dd09a11c63981b32af524cffcdbd177c8f0232 with SHA-1 86fe8f8514 is already in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/15063348

Change-Id: Ic3687b96bc3198c9be33f9118c306df1bc068b59
2021-06-23 09:17:31 +00:00
Paul Duffin
866818588f [automerger skipped] Fix monolithic hidden API processing with prebuilts am: 2a999332ef -s ours
am skip reason: Merged-In I06f3c7df49626bec21a452bc9abf1bb9e7545e5c with SHA-1 d061d40eb6 is already in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/15063347

Change-Id: Ib9a70db9ff261433a924589b47721f7b28a1ffa1
2021-06-23 09:17:24 +00:00
Paul Duffin
bca81c5c82 [automerger skipped] Make CheckHiddenAPIRuleInputs more reusable am: 4c2f78bff4 -s ours
am skip reason: Merged-In I33df26610738c48879fa0b8250dc377dd04bb07d with SHA-1 51d7da2c4e is already in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/15063346

Change-Id: I88f70255133c100fc30f9059c435813c1b560c20
2021-06-23 09:17:20 +00:00
Paul Duffin
7491729ab4 [automerger skipped] Use classpath elements in platform_bootclasspath am: 3ae9e2cef5 -s ours
am skip reason: Merged-In I7c2a229fab60d02bd211438735a8d7303ed83386 with SHA-1 89f570ac44 is already in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/15063345

Change-Id: I1b9b75853aa67f36cf879b61c98d1009d9b7a664
2021-06-23 09:17:14 +00:00
Jooyung Han
4c4da0688c fix: comparison between min_sdk_version
Added test demonstrates the error case. The bug was that java modules'
ShouldSupportSdkVersion() converts min_sdk_version into effective
version before comparison, which discards "preview" version into
"future" version. That caused a weird case like rejecting with error
"should support "S"" even when it is set to "S".

Bug: n/a
Test: m nothing
Change-Id: Ieb53f0097b2969a8535778b1286dbfa0d4895ad4
2021-06-23 10:45:28 +09:00
Paul Duffin
bbb8c289b8 Merge "Disable boot jars package check if no boot jars have been configured" am: 99fc06f8ed am: 5a5f422c23
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1742164

Change-Id: I807bfedb98b3bf728bc68389b1aaf544b3fe69f4
2021-06-22 19:09:44 +00:00
satayev
b30905019f Append platform classpath proto configs with missing apex jars.
Any apex classpath fragment that doesn't generate its own classpaths
proto, must still propagate it's boot jars for the platform classpath
fragment to include for complete CLASSPATH variables on device.

Bug: 191127295
Test: atest CtsClasspathsTestCases derive_classpath_test
Change-Id: I93687f69006741fcd66eb6e04891a4b4bbcc3b47
2021-06-22 20:03:54 +01:00
Paul Duffin
5a5f422c23 Merge "Disable boot jars package check if no boot jars have been configured" am: 99fc06f8ed
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1742164

Change-Id: I41e7ff19607b3358b418782a50cf30e05bcb6f44
2021-06-22 18:47:20 +00:00
Paul Duffin
99fc06f8ed Merge "Disable boot jars package check if no boot jars have been configured" 2021-06-22 18:28:16 +00:00
Paul Duffin
0e7bb0e80a Add test for sdk that contains overlapping members
This change adds a test for an sdk that includes a java_sdk_library
directly as well as transitively includes one of the component modules
that it creates. It also adds a test for the names of a versioned
java_sdk_library_import's components as fixing one requires fixing the
other.

The use case added is one that does occur in the art-module-sdk. It has
a couple of pairs of java_sdk_library and java_system_modules that
cause both the java_sdk_library and one of its component modules to be
included in the sdk snapshot. That causes problems when building
against prebuilts.

e.g. The art-module-sdk_art.module.public.api.stubs module is a
duplicate of the art.module.public.api.stubs module created by the
art.module.public.api java_sdk_library_import. The former is added
because the art-module-public-api-stubs-system-modules depends on it.

A follow up change will avoid the component being added to the sdk
snapshot separately and instead cause the snapshot to use the
component created by the java_sdk_library_import in the snapshot.

Bug: 179354495
Test: m nothing
Merged-In: Ifdc1b4a5a7968db2ded3fdb7eb02f9cff77c7c3f
Change-Id: Ifdc1b4a5a7968db2ded3fdb7eb02f9cff77c7c3f
(cherry picked from commit 3302871b7d)
2021-06-22 19:16:28 +01:00
Paul Duffin
0b5a143c32 Remove unused apiModuleName
Bug: 179354495
Test: m nothing
Merged-In: Id1dd09a11c63981b32af524cffcdbd177c8f0232
Change-Id: Id1dd09a11c63981b32af524cffcdbd177c8f0232
(cherry picked from commit 86fe8f8514)
2021-06-22 19:16:28 +01:00
Paul Duffin
2a999332ef Fix monolithic hidden API processing with prebuilts
Prebuilt modules do not provide classesJars containing annotations.
Previously, the monolithic hidden API processing just used classesJars
from all the modules that provided them so when building against
prebuilts would have fewer classesJars than when building against
sources and so would produce different hidden API flags.

This change will generate the monolithic files from both classesJars
and files previously generated from hidden API processing. A fragment
that has performed hidden API processing will contribute its generated
files whereas standalone libraries and fragments which have not
performed hidden API processing will contribute classesJars.

Bug: 177892522
Test: m out/soong/hiddenapi/hiddenapi-flags.csv
      m SOONG_CONFIG_art_module_source_build=false out/soong/hiddenapi/hiddenapi-flags.csv
      - verify that the files are identical whether built from
        source or prebuilts.
Merged-In: I06f3c7df49626bec21a452bc9abf1bb9e7545e5c
Change-Id: I06f3c7df49626bec21a452bc9abf1bb9e7545e5c
(cherry picked from commit d061d40eb6)
2021-06-22 19:16:27 +01:00
Paul Duffin
4c2f78bff4 Make CheckHiddenAPIRuleInputs more reusable
Adds a message parameter and allows leading spaces in the expected file
string to allow them to be nicely indented.

Bug: 177892522
Test: m nothing
Merged-In: I33df26610738c48879fa0b8250dc377dd04bb07d
Change-Id: I33df26610738c48879fa0b8250dc377dd04bb07d
(cherry picked from commit 51d7da2c4e)
2021-06-22 19:16:27 +01:00
Paul Duffin
3ae9e2cef5 Use classpath elements in platform_bootclasspath
Use classpath elements in newMonolithicHiddenAPIInfo. That means the
method can collate information from both fragments and libraries rather
than just fragments. So, this change moves the collation of the
classesJars into the method.

Bug: 177892522
Test: m out/soong/hiddenapi/hiddenapi-flags.csv out/soong/hiddenapi/hiddenapi-index.csv
      - make sure that this change does not affect the contents.
Merged-In: I7c2a229fab60d02bd211438735a8d7303ed83386
Change-Id: I7c2a229fab60d02bd211438735a8d7303ed83386
(cherry picked from commit 89f570ac44)
2021-06-22 19:16:27 +01:00
Paul Duffin
a08e4dcfef Refactor the printing of an sdk snapshot's Android.bp contents
Previously, all of the supported types were handled explicitly using
type switches. This change switches to use reflection instead to allow
it to work with unknown types such as custom structures, support for
which will be added in a follow up change.

Bug: 179354495
Test: m nothing
Change-Id: I197f3f1dbce6d80c0127c99bbe6f836d422a8db9
2021-06-22 19:07:22 +01:00
Paul Duffin
87f7414651 Add test for sdk that contains overlapping members am: 3302871b7d am: e72d1c1c44
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1742161

Change-Id: Iaf80dd01e17edb2390915c291facd9d9c896b101
2021-06-22 17:48:11 +00:00
Paul Duffin
4a5ce3c924 Remove unused apiModuleName am: 86fe8f8514 am: 276f616330
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1742160

Change-Id: Ic2d075eac6867ba41f3cb70e7cddf2433abee9fd
2021-06-22 17:48:04 +00:00
Paul Duffin
e72d1c1c44 Add test for sdk that contains overlapping members am: 3302871b7d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1742161

Change-Id: I3078d782b59960de4a8e623cef99779aabd574a2
2021-06-22 17:30:32 +00:00
Paul Duffin
276f616330 Remove unused apiModuleName am: 86fe8f8514
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1742160

Change-Id: I4e171589f3eeab2816e69f87239ba568c7e5435b
2021-06-22 17:29:03 +00:00
TreeHugger Robot
564ab33550 [automerger skipped] Merge "Fix bootDexJarByModule with UNSAFE_DISABLE_HIDDENAPI_FLAGS" into sc-dev am: 7b905a3f10 -s ours
am skip reason: Merged-In I7d85340681e54fbd0da69596b6846eb446c6ec6d with SHA-1 e95a15e7c7 is already in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/15053545

Change-Id: I767992f0d65d76afeb245b9f099f54e414833f54
2021-06-22 16:30:32 +00:00
TreeHugger Robot
7b905a3f10 Merge "Fix bootDexJarByModule with UNSAFE_DISABLE_HIDDENAPI_FLAGS" into sc-dev 2021-06-22 16:05:09 +00:00
Paul Duffin
3302871b7d Add test for sdk that contains overlapping members
This change adds a test for an sdk that includes a java_sdk_library
directly as well as transitively includes one of the component modules
that it creates. It also adds a test for the names of a versioned
java_sdk_library_import's components as fixing one requires fixing the
other.

The use case added is one that does occur in the art-module-sdk. It has
a couple of pairs of java_sdk_library and java_system_modules that
cause both the java_sdk_library and one of its component modules to be
included in the sdk snapshot. That causes problems when building
against prebuilts.

e.g. The art-module-sdk_art.module.public.api.stubs module is a
duplicate of the art.module.public.api.stubs module created by the
art.module.public.api java_sdk_library_import. The former is added
because the art-module-public-api-stubs-system-modules depends on it.

A follow up change will avoid the component being added to the sdk
snapshot separately and instead cause the snapshot to use the
component created by the java_sdk_library_import in the snapshot.

Bug: 179354495
Test: m nothing
Change-Id: Ifdc1b4a5a7968db2ded3fdb7eb02f9cff77c7c3f
2021-06-22 16:07:27 +01:00
Paul Duffin
9ffbecc2c8 Disable boot jars package check if no boot jars have been configured
Some build configurations do not configure boot jars. In those cases
the boot jars package check fails so should be skipped.

Bug: 177892522
Test: m nothing
      lunch fvp_mini && m
Change-Id: I5498a8f5cdfb2fabf5223e94dfcee0e853059d01
2021-06-22 14:55:30 +01:00
Paul Duffin
5f9e7bcea4 Merge "Fix monolithic hidden API processing with prebuilts" am: a1a2baf8a7 am: 3adbb7cb05
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1738977

Change-Id: I46c8714db2a0f357c573e34b9b4d26c946fa0878
2021-06-22 12:27:10 +00:00
Paul Duffin
3adbb7cb05 Merge "Fix monolithic hidden API processing with prebuilts" am: a1a2baf8a7
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1738977

Change-Id: I923af1abf0dd93a6ae3261df483b615ff9e38d03
2021-06-22 12:02:28 +00:00
Paul Duffin
86fe8f8514 Remove unused apiModuleName
Bug: 179354495
Test: m nothing
Change-Id: Id1dd09a11c63981b32af524cffcdbd177c8f0232
2021-06-22 12:45:07 +01:00