summaryrefslogtreecommitdiff
path: root/java/systemserver_classpath_fragment.go
diff options
context:
space:
mode:
author Paul Duffin <paulduffin@google.com> 2021-09-07 14:52:48 +0100
committer Paul Duffin <paulduffin@google.com> 2021-09-16 11:12:51 +0100
commit25322e4d98f6dd100959498f648d69a84f417a2c (patch)
treefdd9b0330b212c0e032a0ad32b996e7c61acbbbf /java/systemserver_classpath_fragment.go
parent05732954c627e896527eb2fff2f084a1dd8c31e1 (diff)
Prevent systemserverclasspath_fragment from depending on prebuilts
When TARGET_BUILD_APPS is set then TARGET_BUILD_USE_PREBUILT_SDKS=true which causes all java_sdk_library_import modules to be treated as prefer:true. That breaks the build when the systemserverclasspath_fragment's content property references a source java_sdk_library module that has a corresponding java_sdk_library_import prebuilt module. This fixes the issue by marking the dependency from the systemserverclasspath_fragment to the source module as one that must not be replaced with a reference to the prebuilt module. Test: - update art prebuilts to include service-art m TARGET_BUILD_APPS=Calendar apps_only - fails before, works afterwards Bug: 199116972 Change-Id: Ia2d8ce7bb7e644336a42c901f7fb8ea50fd67909
Diffstat (limited to 'java/systemserver_classpath_fragment.go')
-rw-r--r--java/systemserver_classpath_fragment.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/java/systemserver_classpath_fragment.go b/java/systemserver_classpath_fragment.go
index 5311f62c1..de2a9787f 100644
--- a/java/systemserver_classpath_fragment.go
+++ b/java/systemserver_classpath_fragment.go
@@ -123,10 +123,16 @@ type systemServerClasspathFragmentContentDependencyTag struct {
blueprint.BaseDependencyTag
}
+// The systemserverclasspath_fragment contents must never depend on prebuilts.
+func (systemServerClasspathFragmentContentDependencyTag) ReplaceSourceWithPrebuilt() bool {
+ return false
+}
+
// Contents of system server fragments in an apex are considered to be directly in the apex, as if
// they were listed in java_libs.
func (systemServerClasspathFragmentContentDependencyTag) CopyDirectlyInAnyApex() {}
+var _ android.ReplaceSourceWithPrebuilt = systemServerClasspathFragmentContentDepTag
var _ android.CopyDirectlyInAnyApexTag = systemServerClasspathFragmentContentDepTag
// The tag used for the dependency between the systemserverclasspath_fragment module and its contents.