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

Commit 2d1d4421 authored by Makoto Onuki's avatar Makoto Onuki
Browse files

Use java_import to rename jars

- Apparently, the old way of renaming the jar file broke the renaming
effect in conjunction with ag/33582071.

Use java_import to make sure they get renamed.

- Also add empty jars to ravenwood-runtime to override potential
left over jar files from the previous attempt of ag/33582071.

- Also add the cleanspec, in case it works.

Bug: 292141694
Flag: TEST_ONLY
Test: ./ravenwood/scripts/run-ravenwood-tests.sh -r
Test: manually verify the content of ravenwood-runtime:

$ ls -l $ANDROID_BUILD_TOP/out/host/linux-x86/testcases/ravenwood-runtime/ | sort -k 9
-rw-r--r-- 1 omakoto primarygroup 33340707 May 16 12:31 100-framework-minus-apex.ravenwood.jar
-rw-r--r-- 1 omakoto primarygroup    43875 May 16 12:31 200-kxml2-android.jar
    :
-rw-r--r-- 1 omakoto primarygroup       22 May 16 12:31 framework-minus-apex.ravenwood.jar
-rw-r--r-- 1 omakoto primarygroup       22 May 16 12:47 kxml2-android.jar

Change-Id: Id1f3f3166c6c004249690964d5a0a78e0897d5c1
parent 6e63aaf7
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -263,6 +263,7 @@ $(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/priv-app/InProcessTethering)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/app/OsuLogin)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system_other/system/app/OsuLogin)
$(call add-clean-step, rm -rf $(OUT_DIR)/host/linux-x86/testcases/ravenwood-runtime)
$(call add-clean-step, rm -rf $(OUT_DIR)/host/linux-x86/testcases/ravenwood-runtime)
# ******************************************************************
# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST ABOVE THIS BANNER
# ******************************************************************
+35 −11
Original line number Diff line number Diff line
@@ -641,34 +641,55 @@ filegroup {
// 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_library {
java_import {
    name: "100-framework-minus-apex.ravenwood",
    installable: false,
    static_libs: ["framework-minus-apex.ravenwood"],
    jars: [":framework-minus-apex.ravenwood"],
    visibility: ["//visibility:private"],
}

java_library {
java_import {
    name: "200-kxml2-android",
    installable: false,
    static_libs: ["kxml2-android"],
    jars: [":kxml2-android"],
    visibility: ["//visibility:private"],
}

java_library {
java_import {
    name: "z00-50-framework-updatable-stubs-module_libs_api",
    installable: false,
    static_libs: ["framework-updatable-stubs-module_libs_api-for-host"],
    jars: [":framework-updatable-stubs-module_libs_api-for-host"],
    visibility: ["//visibility:private"],
}

java_library {
java_import {
    name: "z00-all-updatable-modules-system-stubs",
    jars: [":all-updatable-modules-system-stubs-for-host"],
    visibility: ["//visibility:private"],
}

// We add empty jar files with specific names to overwrite stale jar files
// that should be removed from ravenwood-runtime.
// We need them until CleanSpec.mk gets fixed.
//
// TODO(b/418236847) Once CleanSpec.mk is fixed, delete the following
// empty jars and instead delete the whole ravenwood-runtime/ directory,
// using f/b/CleanSpec.mk.

java_defaults {
    name: "ravenwood-empty-jar",
    installable: false,
    static_libs: ["all-updatable-modules-system-stubs-for-host"],
    sdk_version: "core_current",
    visibility: ["//visibility:private"],
}

java_library {
    name: "ravenwood-empty-framework-minus-apex.ravenwood",
    stem: "framework-minus-apex.ravenwood",
}

java_library {
    name: "ravenwood-empty-kxml2-android",
    stem: "kxml2-android",
}

android_ravenwood_libgroup {
    name: "ravenwood-runtime",
    data: [":ravenwood-data"],
@@ -734,6 +755,9 @@ android_ravenwood_libgroup {
        // covered in framework-updatable-stubs-module_libs_api. Libcore
        // doesn't have MODULE_LIBRARIES APIs.)
        "z00-all-updatable-modules-system-stubs",

        "ravenwood-empty-framework-minus-apex.ravenwood",
        "ravenwood-empty-kxml2-android",
    ],
    jni_libs: [
        // Libraries has to be loaded in the following order