summaryrefslogtreecommitdiff
path: root/java/sdk_library.go
diff options
context:
space:
mode:
author Treehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com> 2024-04-18 01:25:15 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2024-04-18 01:25:15 +0000
commit17b9a5b8b401c1175eb7b3d4d59882adccf8f425 (patch)
treea52361cf4e00c82dbddd869a187acb28a850aa3b /java/sdk_library.go
parente25cc5c909783750d86f6ae91b8a170fb5dfc5b1 (diff)
parent5ae65ee6e060815dc5f3c11b505a313a3c37317c (diff)
Merge "Allow dexpreopt of source sdklib in prebuilt apex builds" into main
Diffstat (limited to 'java/sdk_library.go')
-rw-r--r--java/sdk_library.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/java/sdk_library.go b/java/sdk_library.go
index e7e53a2a8..56b1d399d 100644
--- a/java/sdk_library.go
+++ b/java/sdk_library.go
@@ -1562,6 +1562,12 @@ func (module *SdkLibrary) OutputFiles(tag string) (android.Paths, error) {
}
func (module *SdkLibrary) GenerateAndroidBuildActions(ctx android.ModuleContext) {
+ if disableSourceApexVariant(ctx) {
+ // Prebuilts are active, do not create the installation rules for the source javalib.
+ // Even though the source javalib is not used, we need to hide it to prevent duplicate installation rules.
+ // TODO (b/331665856): Implement a principled solution for this.
+ module.HideFromMake()
+ }
if proptools.String(module.deviceProperties.Min_sdk_version) != "" {
module.CheckMinSdkVersion(ctx)
}