Commit graph

26 commits

Author SHA1 Message Date
Spandan Das
a26eda7f2c Update max_sdk_version from SdkSpec to ApiLevel
max_sdk_version signifies device version and does not need an sdkKind to
describe it fully. Update the type and cleanup existing usages. As a
side benefit, we also get better error handling since users can no
longer enter something like `public_30` as a valid max_sdk_version in bp
files

Bug: 208456999
Test: no change in ninja file (this should be a no-op)
Test: TH
Change-Id: I304b5ad802bde200137d8e225182828dfd6f7227
2023-03-23 19:38:56 +00:00
Spandan Das
8c9ae7ed67 Update min_sdk_version from SdkSpec to ApiLevel
This relands aosp/2457063. The original change broke T and U since those
branches still contain soong modules of type (kind+level). Those soong
modules have been cleaned up now

Test: Used go/abtd to test T and U branches with this change

Bug: 208456999
Change-Id: I0ef7933c055f88cb512a02108f1173e51156ef1c
2023-03-22 20:15:45 +00:00
Spandan Das
b74d1e1d91 Revert "Update min_sdk_version from SdkSpec to ApiLevel"
Revert submission 2457063

Reason for revert: Broken udc-dev

Reverted changes: /q/submissionid:2457063

Change-Id: Id6349fc1318877044af713c914a0afd437d3d2d5
2023-03-21 01:36:47 +00:00
Spandan Das
e773739787 Update min_sdk_version from SdkSpec to ApiLevel
min_sdk_version signifies device version and does not need an sdkKind to
describe it fully. Update the type and cleanup existing usages. As a
side benefit, we also get better error handling since users can no
longer enter something like `public_30` as a valid min_sdk_version in bp
files

Will do a similar cleanup for targetSdkVersion and maxSdkVersion in a
followup CL

Test: m nothing
Test: no change in ninja files (this should be a no-op)
Bug: 208456999

Change-Id: Ie6ae7e267d093c5e4787e82685daaca1021d202e
2023-03-20 16:51:32 +00:00
Cole Faust
18994c73f1 Replace SortedStringKeys with SortedKeys
Now that we have generics.

Bug: 193460475
Test: presubmits
Change-Id: I1594fd8feb505175d5c09c03ef397e5ffd5b09cb
2023-02-28 16:51:32 -08:00
Yurii Zubrytskyi
1611334fa2 build/soong - support the REL platform version in classpath
Make sure we select the proper API level number for the REL
platform version when generating the classpath protos

Bug: 231272086
Test: build + boot emulator
Change-Id: Ib3b711dc05dd6136a68e6de414d806687a849bc9
2022-05-06 16:09:52 +00:00
Colin Cross
c68db4b305 Remove InstallBypassMake and ToMakePath
InstallBypassMake and ToMakePath are obsolete, remove them.

Bug: 204136549
Test: m checkbuild
Change-Id: Ie5a6f7254b3d317ed6039e114ed6aec35e1ce273
2021-12-15 15:22:53 -08:00
Artur Satayev
ee594919ea Merge "Use textproto format for classpaths.proto generation." 2021-12-02 15:43:47 +00:00
Artur Satayev
fb0a7234d7 Merge changes Ieb9aef29,I6985ebb6
* changes:
  Propagate min and max sdk versions to classpaths.proto configs.
  Introduce max_sdk_version device property.
2021-12-02 14:53:48 +00:00
satayev
48dae67a76 Use textproto format for classpaths.proto generation.
Test: presubmit
Change-Id: I3fea94153939f05329f02091ca4fa838ee9df93f
2021-12-01 18:24:09 +00:00
satayev
cca4ab762e Propagate min and max sdk versions to classpaths.proto configs.
These attributed define a range for dessert releases where the jars
should be active, and included in corresponding CLASSPATH varibles by
derive_classpath.

Bug: 190818041
Test: presubmit
Change-Id: Ieb9aef29657ad0694d48a63019f93faca2678252
2021-12-01 17:58:41 +00:00
Jiakai Zhang
cee9e19a51 Add entries for STANDALONE_SYSTEMSERVER_JARS to systemserverclasspath.pb
This CL updates platform_systemserverclasspath,
systemserverclasspath_fragment, and
prebuilt_systemserverclasspath_fragment to write entries for
STANDALONE_SYSTEMSERVER_JARS to systemserverclasspath.pb. A new property
`standalone_contents` is aded to `systemserverclasspath_fragment` and
`prebuilt_systemserverclasspath_fragment` to list the standalone system
server jars in the APEX, and entries will be written to
systemserverclasspath.pb accordingly at build time.

To add more context, these entries will be consumed by derive_classpath
in order to generate an environment variable
PRODUCT_STANDALONE_SYSTEM_SERVER_JARS. The environment variable will
then be comsumed by odrefresh to determine what jars to preopt on early
boot.

Note that the variable should not end with "CLASSPATH" because the list
is not used by runtime as a classpath. It is just a colon-separated list
of jars. System server loads the jars separately with paths hardcoded in
the code.

Bug: 203198541
Test: manual -
  1. Add some jars to PRODUCT_STANDALONE_SYSTEM_SERVER_JARS
  2. Add some other jars to PRODUCT_APEX_STANDALONE_SYSTEM_SERVER_JARS
     and standalone_contents.
  3. Build an image.
  4. Flash the image to a device.
  5. adb shell echo \$STANDALONE_SYSTEMSERVER_JARS
  6. See the correct list of jars.
Change-Id: I09a6fd1d3db85c194330da9b751702a9bf069e26
2021-11-30 10:51:10 +00:00
satayev
d604b210c4 Rename UpdatableBootJars to ApexBootJars.
Note that ART apex boot jars and core-icu4j are exceptions here as they
are not part of ApexBootJars. ART apex boot jars are defined in their
own variable, while core-icu4j is treated as a regular non-updatable
boot jar.

Bug: 191127295
Test: atest CtsClasspathsTestCases
Change-Id: I3cea3d82ef521655a1a5ffa8cae2258ab9d08bfc
2021-07-22 17:35:42 +01:00
Paul Duffin
56c93e899a Use both module name and stem name to filter updatable boot jars
Sometimes the stem property is set to change both the installed file
name and the name use to filter the configured module list, e.g. when
adding a test library to replace the standard library, e.g. test_foo
instead of foo.

Sometimes it is used just to change the installed file name.

This change uses both to filter the updatable boot jars and not just
the stem.

Bug: 180105615
Test: m nothing
Change-Id: I6c459fc3597b1e4f062bc9a4e52843305b538c5f
2021-06-29 23:35:25 +01: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
satayev
b98371cc13 Add classpath fragment property to skip proto generation.
This must always be true for updatable apexes, but is not necessary
for non-updatable apexes like com.android.i18n.

In a follow up this will be used to figure out whether apex boot jars
should be bundled into platform_bootclasspath.

Bug: 191127295
Test: atest CtsClasspathsTestCases derive_classpath_test
Change-Id: Ib7dc5b057cb24955222fb97f3ff9da079f30ed77
2021-06-17 12:59:33 +01:00
satayev
142ed27e32 Rename ClasspathFragmentToConfiguredJarList methods to configuredJars.
They are internal implementation details of individual fragments.

Bug: 191127295
Test: m
Change-Id: Ib350135f5f6720741492f362f7b3203e5107772e
2021-06-16 10:13:55 +01:00
satayev
227e745e56 Rename generate proto config file to match classpath type.
There is no need to leak soong module names.

Bug: 180105615
Test: m && launch_cvd; atest CtsClasspathsTestCases
Change-Id: I04f4e181d2f42b9d71641980a2c7c4e8cbc8e426
2021-05-24 12:52:01 +01:00
satayev
7d22657c45 Use absolute paths in classpaths.proto.
The intention before was to use relative paths to a partition where a
config is defined. However, jars in /system_ext partition are planned to
be declared in /system's classpaths.proto config.

Bug: 180105615
Test: derive_classpath_test, CtsClasspathsTestCases
Change-Id: Icc3e1a903c34187cfcd67a3ae7bc3dd746445c03
2021-05-18 19:37:32 +01:00
satayev
14e49130bb Move classpaths.proto related info into a separate provider.
The new info struct can be easily shared with systemserverclasspath
fragments.

Bug: 180105615
Test: m nothing
Change-Id: I9986e64fdf19f4168da63c156de3dc9bcafac8d8
2021-05-17 21:46:04 +01:00
satayev
3db3547d1f Generate empty classpaths.proto for bootclasspath_fragment.go.
- Adds all required details for bootclasspath_fragment to implement
  classpath_fragment.
- Keeps the actual boot jars in platform-bootclasspath to begin with.
- Makes sure to put the file in apex/etc/classpath on device. Note that
  for platform versions of classpath fragment AndroidMkEntries perform
  the installation, while for APEXes it must be plumbed via apex.go.

Bug: 180105615
Test: m && launch_cvd; atest CtsClasspathsTestCases
Change-Id: I6101ebdf5b8bcbe95c0b7ce21f3f67a2685aef50
2021-05-11 10:34:47 +01:00
satayev
013485bd83 Declare ConfiguredJarList in specific fragment implementations.
Each specific classpath_fragment module knows what jars must be part
of the corresponding classpaths.proto config.

Note that bootclasspath_fragment does not implement classpath_fragment
yet, thus all boot jars and all system server jars go into corresponding
platform classpaths.

Bug: 180105615
Test: m && launch_cvd; atest CtsClasspathsTestCases
Change-Id: I6a8c7b0a5d17d62e790a441b8e2c5c1a816e7f30
2021-05-07 16:31:07 +01:00
satayev
95e9c5bbfa Split SYSTEMSERVERCLASSPATH entries from platform_bootclasspath.
Boot jars are different to system server jars at build level, due to
added complexity of dexpreopt. As a logical separation add a new
classpath fragment type and split existing classpaths.proto generation
into relevant pieces.

Bug: 180105615
Test: m && launch_cvd; atest CtsClasspathsTestCases
Change-Id: I88bec09fc920166ffd0092faef980754ddeb6593
2021-05-07 13:24:16 +01:00
satayev
128ce2ff73 Rename classpath_fragment.go methods for better readability.
Bug: 180105615
Test: m nothing
Change-Id: Ic663c22e5b7cbab487dc1fe99805e08843c3213d
2021-05-06 13:27:28 +01:00
Artur Satayev
97259dc625 Generate classpaths.proto config for *CLASSPATH variables.
Instead of embedding "raw" values from PRODUCT_*_CLASSPATH variables
into /etc/classpath, encode them into classpaths.proto binary format.

Existing platform_bootclasspath{} module is used to generate the whole
monolithic config to begin with. Later, the config will be split
among individual bootclasspath_fragment and
systemserverclasspath_fragment modules.

Bug: 180105615
Test: m && launch_cvd
Change-Id: Ia66f521f8976ff78a62ecf91131d26db21064de7
2021-04-14 15:03:23 +01:00
Artur Satayev
eabf2c175f Introduce classpath_fragment.go.
A skeleton of a classpath fragment's interface and base to be used by
any modules that provide entries for *CLASSPATH variables at runtime.

In follow up changes, this would be extended to generate
packages/modules/SdkExtensions/proto/classpaths.proto configs for such
modules to be bundled into system and individual apex binaries.

Bug: 180105615
Test: m
Change-Id: I2df550862e97222c5650c4d0480c90231fd78ef0
2021-04-13 08:58:18 +01:00