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

Commit eb8bdf68 authored by Makoto Onuki's avatar Makoto Onuki
Browse files

Move ravenwood-runtime ravenwood-utils to f/b/r

This will help set better build module visibilities.

Fix: 340891982
Test: $ANDROID_BUILD_TOP/frameworks/base/ravenwood/scripts/run-ravenwood-tests.sh
Flag: EXEMPT build file change only
Merged-in: I96e55a1d73bde7175a3bbdc640201bc146f4a022
Change-Id: I96e55a1d73bde7175a3bbdc640201bc146f4a022
parent 12a7a31b
Loading
Loading
Loading
Loading
+4 −73
Original line number Diff line number Diff line
@@ -137,6 +137,7 @@ java_genrule {

java_library {
    name: "services.core.ravenwood-jarjar",
    defaults: ["ravenwood-internal-only-visibility-java"],
    installable: false,
    static_libs: [
        "services.core.ravenwood",
@@ -144,99 +145,29 @@ java_library {
    jarjar_rules: ":ravenwood-services-jarjar-rules",
}

java_library {
    name: "services.fakes.ravenwood-jarjar",
    installable: false,
    srcs: [":services.fakes-sources"],
    libs: [
        "ravenwood-framework",
        "services.core.ravenwood",
    ],
    jarjar_rules: ":ravenwood-services-jarjar-rules",
}

java_library {
    name: "mockito-ravenwood-prebuilt",
    installable: false,
    static_libs: [
        "mockito-robolectric-prebuilt",
    ],
}

java_library {
    name: "inline-mockito-ravenwood-prebuilt",
    installable: false,
    static_libs: [
        "inline-mockito-robolectric-prebuilt",
    ],
}

// Jars in "ravenwood-runtime" are set to the classpath, sorted alphabetically.
// Rename some of the dependencies to make sure they're included in the intended order.
java_genrule {
    name: "100-framework-minus-apex.ravenwood",
    defaults: ["ravenwood-internal-only-visibility-genrule"],
    cmd: "cp $(in) $(out)",
    srcs: [":framework-minus-apex.ravenwood"],
    out: ["100-framework-minus-apex.ravenwood.jar"],
    visibility: ["//visibility:private"],
}

java_genrule {
    // Use 200 to make sure it comes before the mainline stub ("all-updatable...").
    name: "200-kxml2-android",
    defaults: ["ravenwood-internal-only-visibility-genrule"],
    cmd: "cp $(in) $(out)",
    srcs: [":kxml2-android"],
    out: ["200-kxml2-android.jar"],
    visibility: ["//visibility:private"],
}

java_genrule {
    name: "z00-all-updatable-modules-system-stubs",
    defaults: ["ravenwood-internal-only-visibility-genrule"],
    cmd: "cp $(in) $(out)",
    srcs: [":all-updatable-modules-system-stubs"],
    out: ["z00-all-updatable-modules-system-stubs.jar"],
    visibility: ["//visibility:private"],
}

android_ravenwood_libgroup {
    name: "ravenwood-runtime",
    libs: [
        "100-framework-minus-apex.ravenwood",
        "200-kxml2-android",

        "android.test.mock.ravenwood",
        "ravenwood-helper-runtime",
        "hoststubgen-helper-runtime.ravenwood",
        "services.core.ravenwood-jarjar",
        "services.fakes.ravenwood-jarjar",

        // Provide runtime versions of utils linked in below
        "junit",
        "truth",
        "flag-junit",
        "ravenwood-framework",
        "ravenwood-junit-impl",
        "ravenwood-junit-impl-flag",
        "mockito-ravenwood-prebuilt",
        "inline-mockito-ravenwood-prebuilt",

        // It's a stub, so it should be towards the end.
        "z00-all-updatable-modules-system-stubs",
    ],
    jni_libs: [
        "libandroid_runtime",
    ],
}

android_ravenwood_libgroup {
    name: "ravenwood-utils",
    libs: [
        "junit",
        "truth",
        "flag-junit",
        "ravenwood-framework",
        "ravenwood-junit",
        "mockito-ravenwood-prebuilt",
        "inline-mockito-ravenwood-prebuilt",
    ],
}
+71 −0
Original line number Diff line number Diff line
@@ -186,3 +186,74 @@ filegroup {
    srcs: ["texts/ravenwood-services-jarjar-rules.txt"],
    visibility: ["//frameworks/base"],
}

java_library {
    name: "services.fakes.ravenwood-jarjar",
    installable: false,
    srcs: [":services.fakes-sources"],
    libs: [
        "ravenwood-framework",
        "services.core.ravenwood",
    ],
    jarjar_rules: ":ravenwood-services-jarjar-rules",
    visibility: ["//visibility:private"],
}

java_library {
    name: "mockito-ravenwood-prebuilt",
    installable: false,
    static_libs: [
        "mockito-robolectric-prebuilt",
    ],
}

java_library {
    name: "inline-mockito-ravenwood-prebuilt",
    installable: false,
    static_libs: [
        "inline-mockito-robolectric-prebuilt",
    ],
}

android_ravenwood_libgroup {
    name: "ravenwood-runtime",
    libs: [
        "100-framework-minus-apex.ravenwood",
        "200-kxml2-android",

        "android.test.mock.ravenwood",
        "ravenwood-helper-runtime",
        "hoststubgen-helper-runtime.ravenwood",
        "services.core.ravenwood-jarjar",
        "services.fakes.ravenwood-jarjar",

        // Provide runtime versions of utils linked in below
        "junit",
        "truth",
        "flag-junit",
        "ravenwood-framework",
        "ravenwood-junit-impl",
        "ravenwood-junit-impl-flag",
        "mockito-ravenwood-prebuilt",
        "inline-mockito-ravenwood-prebuilt",

        // It's a stub, so it should be towards the end.
        "z00-all-updatable-modules-system-stubs",
    ],
    jni_libs: [
        "libandroid_runtime",
    ],
}

android_ravenwood_libgroup {
    name: "ravenwood-utils",
    libs: [
        "junit",
        "truth",
        "flag-junit",
        "ravenwood-framework",
        "ravenwood-junit",
        "mockito-ravenwood-prebuilt",
        "inline-mockito-ravenwood-prebuilt",
    ],
}
+1 −1
Original line number Diff line number Diff line
@@ -16,5 +16,5 @@ filegroup {
        "java/**/*.java",
    ],
    path: "java",
    visibility: ["//frameworks/base"],
    visibility: ["//frameworks/base/ravenwood:__subpackages__"],
}
+1 −3
Original line number Diff line number Diff line
@@ -51,10 +51,8 @@ java_sdk_library {

java_library {
    name: "android.test.mock.ravenwood",
    defaults: ["ravenwood-internal-only-visibility-java"],
    srcs: [":android-test-mock-sources"],
    visibility: [
        "//frameworks/base",
    ],
}

android_ravenwood_test {