Commit Graph

5428 Commits

Author SHA1 Message Date
Jiakai Zhang
7ef8c14573 Merge changes I9c94a54a,Idc0c73a7 am: 2c6ede11cc am: 23a5cba0af am: 57c29dd3e3 am: 36c6e5583f am: 9c4f4a179f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1824513

Change-Id: Ic1c8e0971d4807c92bdc8138a62c435862e70b69
2021-09-17 12:23:41 +00:00
Jiakai Zhang
d029384d38 Merge "Revert^2 "Preopt APEX system server jars."" am: c9f9d56ed4 am: dc2c1c2625 am: f3d12b3172 am: ac66e68946 am: 611a4eacc6
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1828115

Change-Id: Ia5585ff7f08ef6c5c5ea7b2ecd544a25d63a89a8
2021-09-17 12:23:06 +00:00
Jiakai Zhang
23a5cba0af Merge changes I9c94a54a,Idc0c73a7 am: 2c6ede11cc
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1824513

Change-Id: I1f3ce39cd3b3988e676791a59f0c70e2bc80015d
2021-09-17 11:33:22 +00:00
Jiakai Zhang
dc2c1c2625 Merge "Revert^2 "Preopt APEX system server jars."" am: c9f9d56ed4
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1828115

Change-Id: I2a991341934af96455f136cbe44ef824f5e3e7f5
2021-09-17 11:33:13 +00:00
Jiakai Zhang
2c6ede11cc Merge changes I9c94a54a,Idc0c73a7
* changes:
  Preopt system server jars with updatable bootclasspath.
  Preopt APEX system server jars from prebuilts.
2021-09-17 11:20:10 +00:00
Jiakai Zhang
c9f9d56ed4 Merge "Revert^2 "Preopt APEX system server jars."" 2021-09-17 11:19:51 +00:00
Martin Stjernholm
460d7bb14c Merge "Remove fallback code path for missing BCP fragments that is no longer necessary." am: 33ce5d6c0e am: 44cbc71c78 am: 6057a13940 am: 6f2cf056ca am: 71ea8b36dd
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1821658

Change-Id: I88b0d7bd49e547f91a76203683a30035f459c602
2021-09-16 15:48:45 +00:00
Martin Stjernholm
44cbc71c78 Merge "Remove fallback code path for missing BCP fragments that is no longer necessary." am: 33ce5d6c0e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1821658

Change-Id: I145f398e8b22cca8e9e91a62d83cbb2014032261
2021-09-16 14:48:57 +00:00
Martin Stjernholm
33ce5d6c0e Merge "Remove fallback code path for missing BCP fragments that is no longer necessary." 2021-09-16 14:38:01 +00:00
Treehugger Robot
c60ade12f7 Merge "Prevent systemserverclasspath_fragment from depending on prebuilts" am: a66a9f1a14 am: 1bf0694fbf am: 3f8c2360dc am: 987a1ffcd3 am: 7f7570dc91
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1818248

Change-Id: I8e4fe3d65f514e657ca604fb76c8cb26f0cd00bb
2021-09-16 12:34:34 +00:00
Treehugger Robot
1bf0694fbf Merge "Prevent systemserverclasspath_fragment from depending on prebuilts" am: a66a9f1a14
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1818248

Change-Id: I49ac420f4fc5b9220d1ff57b6c55a6a9d271c5d0
2021-09-16 11:35:43 +00:00
Paul Duffin
25322e4d98 Prevent systemserverclasspath_fragment from depending on prebuilts
When TARGET_BUILD_APPS is set then TARGET_BUILD_USE_PREBUILT_SDKS=true
which causes all java_sdk_library_import modules to be treated as
prefer:true.

That breaks the build when the systemserverclasspath_fragment's content
property references a source java_sdk_library module that has a
corresponding java_sdk_library_import prebuilt module.

This fixes the issue by marking the dependency from the
systemserverclasspath_fragment to the source module as one that must
not be replaced with a reference to the prebuilt module.

Test: - update art prebuilts to include service-art
      m TARGET_BUILD_APPS=Calendar apps_only
      - fails before, works afterwards
Bug: 199116972
Change-Id: Ia2d8ce7bb7e644336a42c901f7fb8ea50fd67909
2021-09-16 11:12:51 +01:00
Jiakai Zhang
519c5c82e5 Revert^2 "Preopt APEX system server jars."
This reverts commit 92346c4832.

Reason for revert: Fixed build error.

The build error is fixed by ag/15841934. This CL remains unchanged. This
CL will be submitted AFTER ag/15841934 is submitted.

Bug: 200024131
Test: 1. Patch this CL and ag/15841934 into internal master.
  2. sudo vendor/google/build/build_test.bash

Change-Id: I5f2b8357846fc7dda56e25ebe6ffb095e8047ec8
2021-09-16 06:25:26 +00:00
Martin Stjernholm
b1e61cb8bc Remove fallback code path for missing BCP fragments that is no longer
necessary.

#codehealth

Test: m nothing
Bug: 179354495
Change-Id: Iaddf163e69b52cef82d522311e81bef9bdb4aa8d
2021-09-16 00:55:53 +01:00
Pedro Loureiro
97a3d20be6 Merge "Add support for new permissions library tag attributes" 2021-09-15 17:19:29 +00:00
Adrian Roos
a86c5892dd Merge "Revert "Preopt APEX system server jars."" am: 79839d94c1 am: 755a09490f am: abda2b7474 am: f3f17d366e am: e50f1735b6
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1827535

Change-Id: I4f2a4a579b1f78eaf575742e8a489512bcc9984a
2021-09-15 15:53:18 +00:00
Adrian Roos
755a09490f Merge "Revert "Preopt APEX system server jars."" am: 79839d94c1
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1827535

Change-Id: I2281010a93a89b69b859272627c7eac0d7e6d3ed
2021-09-15 14:53:58 +00:00
Paul Duffin
a8d87fa548 Merge "Rename SdkMemberTypeDependencyTag to SdkMemberDependencyTag" am: c2c7f3e49b am: 063ad070c0 am: b4e6408f03 am: 529c5dc486 am: ef2376b685
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1826225

Change-Id: Ic25b213481c07f9b4487b6b7c4bd4d6ebefdff4e
2021-09-15 14:38:24 +00:00
Adrian Roos
79839d94c1 Merge "Revert "Preopt APEX system server jars."" 2021-09-15 14:31:42 +00:00
Adrian Roos
92346c4832 Revert "Preopt APEX system server jars."
This reverts commit ca9bc98e0c.

Reason for revert: breaks build
Bug: 200024131

Change-Id: Ide07b4c4d267370ae31107b1598b2f878c701282
2021-09-15 14:11:07 +00:00
Paul Duffin
063ad070c0 Merge "Rename SdkMemberTypeDependencyTag to SdkMemberDependencyTag" am: c2c7f3e49b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1826225

Change-Id: I304997b8488094a28ef8b75baaf0d9c4341b1512
2021-09-15 13:44:01 +00:00
Paul Duffin
c2c7f3e49b Merge "Rename SdkMemberTypeDependencyTag to SdkMemberDependencyTag" 2021-09-15 13:29:23 +00:00
Jiakai Zhang
de0a033fd8 Preopt APEX system server jars. am: ca9bc98e0c am: 83d0d8ac1c am: 6ff963aacb am: 3b3063da67 am: 9ce81715f7
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1821984

Change-Id: If931f0aeca50b2c69f9072640255077f02c853f2
2021-09-15 11:45:57 +00:00
Jiakai Zhang
83d0d8ac1c Preopt APEX system server jars. am: ca9bc98e0c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1821984

Change-Id: If42b905c0636b10881b372efafd3e2f9bc84923c
2021-09-15 10:48:53 +00:00
Jiakai Zhang
02669e8a30 Preopt system server jars with updatable bootclasspath.
Previously, we preopt system server jars without updatable bootclasspath
in the build system so that the artifacts can keep valid after a
mainline update. Things have been changed after then. We now re-compile
system server jars on the user's device after a mainline update
(b/189467174), so we no longer need the artifacts generated at build
time to keep valid. Therefore, we can preopt system server jars with
updatable bootclasspath to achieve better performance.

Bug: 199573699
Test: m services
Test: manual - 1. Build a system image and flash it into a device.
  2. adb root && adb shell grep "services" /proc/`adb shell pidof system_server`/maps
  3. See "/system/framework/oat/x86_64/services.{odex,vdex,art} in the
  output.
  4. adb logcat -d odrefresh:D odsign:D "*:S"
  5. See "odrefresh said artifacts are VALID" and no dex2oat invocation
  in the output.

Change-Id: I9c94a54aa15c46708067f4bc89ff05bc7af32a7b
2021-09-15 09:01:07 +00:00
Jiakai Zhang
ca9bc98e0c Preopt APEX system server jars.
The path to the artifacts will in the form of
/system/framework/oat/<arch>/<encoded-jar-path>@classes.{odex,vdex,art},
where <encoded-jar-path> is the path to the jar file with "/" replaced
by "@". For example,
/system/framework/oat/x86_64/apex@com.android.art@javalib@service-art.jar@classes.odex

There will be a follow-up CL to update ART runtime to recognize
artifacts in that path.

Test: m com.android.art
Bug: 194150908
Change-Id: Ic89fd63c4b1cd565684cead83fc91dae3bc97a4c
2021-09-15 09:01:07 +00:00
Jiakai Zhang
204356f3b5 Preopt APEX system server jars from prebuilts.
Similar to the previous CL, but for jars from prebuilts.

Test: manual - 1. Patch aosp/1818020 and aosp/1810840.
  2. m SOONG_CONFIG_art_module_source_build=false com.android.art
Bug: 194150908
Change-Id: Idc0c73a78045a602ad3a91cb5071d291bd611015
2021-09-15 09:01:07 +00:00
Treehugger Robot
1ec719ab09 Merge "Fix panic when a module has an invalid output path" am: cf6749630a am: 32e5355bab am: b2e53db028 am: faf1826ea9 am: 22c6891939
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1826960

Change-Id: I4ef4c808c9fee14741c2168a32eca25a0402942c
2021-09-15 05:30:55 +00:00
Treehugger Robot
32e5355bab Merge "Fix panic when a module has an invalid output path" am: cf6749630a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1826960

Change-Id: I972bbb9b99121e1ee4ffb33c0278f239dd61db8f
2021-09-15 04:37:54 +00:00
Treehugger Robot
cf6749630a Merge "Fix panic when a module has an invalid output path" 2021-09-15 04:23:13 +00:00
Treehugger Robot
7287308ee0 Merge "Add {.aar} support for android_library" am: db3ff57368 am: 7b3130a459 am: 7181c70efb am: bc1de88b71 am: 8cbe142522
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1826617

Change-Id: Idb6f92bd3aa34f899573b752d69068ee5c4fcc83
2021-09-15 00:58:43 +00:00
Cole Faust
64cb7c964a Fix panic when a module has an invalid output path
dep.OutputFile().Path() can panic if the OutputFile
is invalid, so move more of the code into the check
for validity. This changes the go crash into a
build error.

Bug: 158624492
Test: Apply the patchset 1 of ag/11815659, lunch aosp_x86_64-eng, m
Change-Id: Ic8a728be1b570ac73be7b2b9461676f9fd99c266
2021-09-14 17:35:19 -07:00
Treehugger Robot
7b3130a459 Merge "Add {.aar} support for android_library" am: db3ff57368
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1826617

Change-Id: I2404648a8bdea49d13f2c747a75b82002ee172b5
2021-09-15 00:23:18 +00:00
Saeid Farivar Asanjan
1fca301bd2 Add {.aar} support for android_library
Change-Id: I2c392d3dfc545c23495b03d0f236680fd59e1401
2021-09-14 21:02:43 +00:00
Paul Duffin
f7b3d0d317 Rename SdkMemberTypeDependencyTag to SdkMemberDependencyTag
Bug: 195754365
Test: m nothing
Change-Id: Id4ef6f8be54c60a1f269d7e7c46a8dcb715fcca4
2021-09-14 17:26:14 +01:00
Pedro Loureiro
826863c8e0 Add support for new permissions library tag attributes
We are expanding PackageManager's supported attributes and this change
enables the developer to define them in the .bp file.

Test: m nothing

Bug: 191978330

Change-Id: I01d579190fb585662086a7fc456f3b33cb89fb57
2021-09-14 10:33:32 +00:00
Ulyana Trafimovich
b8e2ddff2a Merge changes I4e7aa1a3,Ic0cd2411 am: 2e380e7971 am: b8e95806f8 am: f26abe2744 am: 3ed3b56945 am: abfd639a19
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1815791

Change-Id: Ida93df21b78a70d36c007acad91ddb4ac1e55107
2021-09-02 16:43:01 +00:00
Ulyana Trafimovich
b8e95806f8 Merge changes I4e7aa1a3,Ic0cd2411 am: 2e380e7971
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1815791

Change-Id: Ie2a5d819d9e9e76a349c6b2e576e09b4c4551895
2021-09-02 15:44:57 +00:00
Ulyana Trafimovich
2e380e7971 Merge changes I4e7aa1a3,Ic0cd2411
* changes:
  Fix DONT_UNCOMPRESS_PRIV_APPS_DEXS for `android_app_import`.
  Add tests for uncompressed dex for `android_app_import`.
2021-09-02 15:20:58 +00:00
Ulya Trafimovich
0061c0d1da Fix DONT_UNCOMPRESS_PRIV_APPS_DEXS for android_app_import.
Don't uncompress priv-app dex for `android_app_import` if
DONT_UNCOMPRESS_PRIV_APPS_DEXS is true. Update expected test results.

Bug: 194504107
Test: m nothing
Change-Id: I4e7aa1a3deea856f388ae5ecd9292301f8a09a2f
2021-09-01 15:44:50 +01:00
Ulya Trafimovich
55f72d706d Add tests for uncompressed dex for android_app_import.
Some of the test cases for privileged apps currently produce incorrect
results (e.g. with DONT_UNCOMPRESS_PRIV_APPS_DEXS := true); they are
marked with TODO and will be fixed in a follow-up CL.

Bug: 194504107
Test: m nothing
Change-Id: Ic0cd24113a27850a967afa0b3deb4a6324f95347
2021-09-01 15:44:28 +01:00
Treehugger Robot
b853ecc4ef Merge "Refactor SdkMemberType.AddDependencies()" am: a36ffdead5 am: 05ac706e6f am: d8269ba38e am: ca6392382e am: 05f8c679a0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1808897

Change-Id: I98dcce7da0b466192658945a0ec2ef67efba9119
2021-08-31 20:24:51 +00:00
Treehugger Robot
05ac706e6f Merge "Refactor SdkMemberType.AddDependencies()" am: a36ffdead5
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1808897

Change-Id: I0535c811329b9101059bf9a8953ee203335d2cb4
2021-08-31 19:08:38 +00:00
Treehugger Robot
a36ffdead5 Merge "Refactor SdkMemberType.AddDependencies()" 2021-08-31 18:53:59 +00:00
Spandan Das
841764eb92 Merge "Skip dexbootjar check using AllowMissingDependencies flag" am: b7e5985fd5 am: ab47a767d8 am: 572842e09c am: e0eaa06d87 am: 716ecba7ea
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1803934

Change-Id: Id970ee5cfb571ca78395ea66bfc5e23ff9df5fd2
2021-08-31 17:25:44 +00:00
Spandan Das
ab47a767d8 Merge "Skip dexbootjar check using AllowMissingDependencies flag" am: b7e5985fd5
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1803934

Change-Id: I55ae4c5858330385876eb42e0fa16773ca748150
2021-08-31 16:12:21 +00:00
Paul Duffin
296701e35b Refactor SdkMemberType.AddDependencies()
Replaces the BottomUpMutatorContext parameter with a new
SdkDependencyContext type that extends BottomUpMutatorContext. This is
to allow the sdk to pass additional information to the implementations
of that method to allow the behavior to be more finely tuned.

Bug: 195754365
Test: m nothing
Change-Id: I69c6d2c523934eb67d7a7e6c55c241e9b8a81773
2021-08-31 17:07:07 +01:00
Spandan Das
b7e5985fd5 Merge "Skip dexbootjar check using AllowMissingDependencies flag" 2021-08-31 16:06:10 +00:00
Treehugger Robot
04b819feed Merge "[LSC] Add LOCAL_LICENSE_KINDS to build/soong" am: cc1990f564 am: e29c1e9a9c am: 4c2796f833 am: 8565e0232f am: 4758122721
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1811859

Change-Id: I5da1febeeca68d0256e495571a63613680a72792
2021-08-27 22:59:27 +00:00
Treehugger Robot
e29c1e9a9c Merge "[LSC] Add LOCAL_LICENSE_KINDS to build/soong" am: cc1990f564
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1811859

Change-Id: I1f14f7e37557af3be87f8c322fc02d433cb79b4a
2021-08-27 21:56:22 +00:00