summaryrefslogtreecommitdiff
path: root/java/hiddenapi_singleton.go
diff options
context:
space:
mode:
author Jihoon Kang <jihoonkang@google.com> 2024-04-05 00:36:44 +0000
committer Jihoon Kang <jihoonkang@google.com> 2024-05-03 20:51:11 +0000
commitd831af426762a24794f3420ba00eb1b388cea221 (patch)
tree2341b9c8943ce73ab7af0c0dbba1c286be1c1190 /java/hiddenapi_singleton.go
parent2ddb22ce99d56fdaf0ce65726d68c068b3dc3247 (diff)
Remove compilation actions from java sdk library
This change modifies the build actions of java_sdk_library module type so that it does not perform any compilation actions (i.e. does not create the top level java_sdk_library jar file). Instead, it delegates the build actions the top level jar file was performing to the dynamically created ".impl"-suffixed java library module. The build actions that are delegated to the impl library module include hiddenapi processing, dexing, and dexpreopt. Test: m nothing --no-skip-soong-tests Bug: 332785297 Change-Id: I7534f9eaacf6d9f72fbf8d540b1e26af84106c20
Diffstat (limited to 'java/hiddenapi_singleton.go')
-rw-r--r--java/hiddenapi_singleton.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/java/hiddenapi_singleton.go b/java/hiddenapi_singleton.go
index 8cb78cd54..7d21b7a61 100644
--- a/java/hiddenapi_singleton.go
+++ b/java/hiddenapi_singleton.go
@@ -150,6 +150,10 @@ func isModuleInConfiguredList(ctx android.BaseModuleContext, module android.Modu
// Strip a prebuilt_ prefix so that this can match a prebuilt module that has not been renamed.
name = android.RemoveOptionalPrebuiltPrefix(name)
+ // Strip the ".impl" suffix, so that the implementation library of the java_sdk_library is
+ // treated identical to the top level java_sdk_library.
+ name = strings.TrimSuffix(name, ".impl")
+
// Ignore any module that is not listed in the boot image configuration.
index := configuredBootJars.IndexOfJar(name)
if index == -1 {