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

Commit a92f9ad8 authored by Anton Hansson's avatar Anton Hansson Committed by Automerger Merge Worker
Browse files

Merge "Share list of libs to depend on for APIs" into main am: 92ba7fca

parents a97d6ff5 92ba7fca
Loading
Loading
Loading
Loading
+11 −13
Original line number Original line Diff line number Diff line
@@ -350,6 +350,16 @@ stubs_defaults {
    visibility: ["//frameworks/base/api"],
    visibility: ["//frameworks/base/api"],
}
}


// We resolve dependencies on APIs in modules by depending on a prebuilt of the whole
// platform (sdk_system_current_android). That prebuilt does not include module-lib APIs,
// so use the prebuilt module-lib stubs for modules that export module-lib stubs that the
// non-updatable part depends on.
non_updatable_api_deps_on_modules = [
    "sdk_module-lib_current_framework-tethering",
    "sdk_module-lib_current_framework-connectivity-t",
    "sdk_system_current_android",
]

// Defaults with module APIs in the classpath (mostly from prebuilts).
// Defaults with module APIs in the classpath (mostly from prebuilts).
// Suitable for compiling android-non-updatable.
// Suitable for compiling android-non-updatable.
stubs_defaults {
stubs_defaults {
@@ -361,19 +371,7 @@ stubs_defaults {
            "packages/modules/Media/apex/aidl/stable",
            "packages/modules/Media/apex/aidl/stable",
        ],
        ],
    },
    },
    libs: [
    libs: non_updatable_api_deps_on_modules,
        "art.module.public.api",
        "sdk_module-lib_current_framework-tethering",
        "sdk_module-lib_current_framework-connectivity-t",
        "sdk_public_current_framework-bluetooth",
        // There are a few classes from modules used by the core that
        // need to be resolved by metalava. We use a prebuilt stub of the
        // full sdk to ensure we can resolve them. If a new class gets added,
        // the prebuilts/sdk/current needs to be updated.
        "sdk_system_current_android",
        // NOTE: The below can be removed once the prebuilt stub contains IKE.
        "sdk_system_current_android.net.ipsec.ike",
    ],
}
}


// Defaults for the java_sdk_libraries of unbundled jars from framework.
// Defaults for the java_sdk_libraries of unbundled jars from framework.
+1 −11
Original line number Original line Diff line number Diff line
@@ -351,17 +351,7 @@ java_library {
        "android-non-updatable_from_source_defaults",
        "android-non-updatable_from_source_defaults",
    ],
    ],
    srcs: [":module-lib-api-stubs-docs-non-updatable"],
    srcs: [":module-lib-api-stubs-docs-non-updatable"],
    libs: [
    libs: non_updatable_api_deps_on_modules,
        // We cannot depend on all-modules-module-lib-stubs, because the module-lib stubs
        // depend on this stub. We resolve dependencies on APIs in modules by depending
        // on a prebuilt of the whole platform (sdk_system_current_android).
        // That prebuilt does not include module-lib APIs, so use the prebuilt module-lib
        // stubs for modules that export module-lib stubs that the non-updatable part
        // depends on.
        "sdk_module-lib_current_framework-tethering",
        "sdk_module-lib_current_framework-connectivity-t",
        "sdk_system_current_android",
    ],
    dist: {
    dist: {
        dir: "apistubs/android/module-lib",
        dir: "apistubs/android/module-lib",
    },
    },