Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b9becde3 authored by Jared Duke's avatar Jared Duke
Browse files

Add a services.impl intermediate target

Introduce a new static library, services.impl, that contains all static
deps for for services. This target can be used as a proxy `libs` dep
by downstream system server jars for linking, allowing those downstream
jars to be used as tracing references when generating the final services
target keep rules.

Bug: 212737576
Test: m + presubmit
Flag: EXEMPT build target refactor
Change-Id: I16733c8127b71a6449adf18bbc3b2e720556ac58
parent fa3aaa18
Loading
Loading
Loading
Loading
+28 −7
Original line number Diff line number Diff line
@@ -238,8 +238,6 @@ ondeviceintelligence_module_java_defaults {
    },
}

// merge all required services into one jar
// ============================================================
soong_config_module_type {
    name: "system_java_library",
    module_type: "java_library",
@@ -271,15 +269,14 @@ vintf_fragment {
    src: "manifest_services_android.frameworks.devicestate.xml",
}

system_java_library {
    name: "services",
// merge all required services into one intermediate jar
// ============================================================
java_library {
    name: "services.impl",
    defaults: [
        "services_java_defaults",
        "art_profile_java_defaults",
        "services_crashrecovery_stubs_conditionally",
        "ondeviceintelligence_conditionally",
    ],
    installable: true,

    exclude_kotlinc_generated_files: true,

@@ -340,6 +337,30 @@ system_java_library {
        "service-sdksandbox.stubs.system_server",
    ],

    // Uncomment to enable output of certain warnings (deprecated, unchecked)
    //javacflags: ["-Xlint"],

    visibility: [
        ":__subpackages__",
        "//frameworks/opt:__subpackages__",
    ],
}

// merge all required services into one final installable jar
// ============================================================
system_java_library {
    name: "services",
    defaults: [
        "services_java_defaults",
        "art_profile_java_defaults",
    ],
    installable: true,

    exclude_kotlinc_generated_files: true,

    // Note: all srcs and static_libs deps should go in services.impl.
    static_libs: ["services.impl"],

    soong_config_variables: {
        without_hal: {
            vibrator: {