platform_build_soong/etc
Kevin 93f7cd8528 Add support for prebuilt_overlay module type in soong
In Android 11 or higher, you can use OverlayConfig
to configure the mutability, default state, and priority
of overlays.

To configure an overlay, you need to create a config.xml
in partition/overlay/config/. Since there is no module type
in soong to install prebuilt artifacts on that location
(like prebuilt_etc for example) we need to manually create
and move that file using Make duing the build process.

This commit adds support to instead create that file
using soong. Then we can instead do something along the
lines of:

prebuilt_overlay {
    name: "test-overlay",
    src: ":generate-test-overlay",
    sub_dir: "config",
    filename: "config.xml",
    product_specific: true,
}

which would create a config.xml file at the overlay/
directory of the partion in which the overlay is configured,
product/ in this example.

Test: cd build/soong/etc ; go test -run \
      TestPrebuiltOverlayInstallDirPath

Bug: 340833016

Change-Id: Iaecae7784683fb9c4306a6834b3ee705c9c20806
2024-05-16 11:00:32 +02:00
..
Android.bp Deprecate Snapshot build 2024-04-05 01:56:56 +00:00
install_symlink.go Add install_symlink soong module type 2023-09-01 17:18:48 -07:00
install_symlink_test.go Add install_symlink soong module type 2023-09-01 17:18:48 -07:00
prebuilt_etc.go Add support for prebuilt_overlay module type in soong 2024-05-16 11:00:32 +02:00
prebuilt_etc_test.go Add support for prebuilt_overlay module type in soong 2024-05-16 11:00:32 +02:00