From e521ae306aa96e142ffa325f40df2c233591f53a Mon Sep 17 00:00:00 2001 From: Zhi Dou Date: Mon, 19 Feb 2024 18:36:40 +0000 Subject: [PATCH] Add sdk_version to test libraries If sdk_version is empty, by default the library will be built against the implementation of the framework jars. There are on going project to automatically repackaging flag libraries in the libray which is built direactly against the implementation of the framework jars. This change set the right sdk_version for the testing library. Bug: 310504781 Test: atest jarjar-rules-generator-test and CI Change-Id: I24d8dc47f7ed83f0b84c632d24396e2bdf932424 --- tools/Android.bp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/Android.bp b/tools/Android.bp index b7b2aaafd5..9216b5bc24 100644 --- a/tools/Android.bp +++ b/tools/Android.bp @@ -42,6 +42,7 @@ java_library { name: "jarjar-rules-generator-testjavalib", srcs: ["testdata/java/**/*.java"], libs: ["unsupportedappusage"], + sdk_version: "core_platform", visibility: ["//visibility:private"], } @@ -56,6 +57,7 @@ java_library { static_libs: [ "framework-connectivity.stubs.module_lib", ], + sdk_version: "module_current", // Not strictly necessary but specified as this MUST not have generate // a dex jar as that will break the tests. compile_dex: false, @@ -67,6 +69,7 @@ java_library { static_libs: [ "framework-connectivity-t.stubs.module_lib", ], + sdk_version: "module_current", // Not strictly necessary but specified as this MUST not have generate // a dex jar as that will break the tests. compile_dex: false,