Don't depend on classes-header.jar when turbine is disabled

TARGET_BUILD_APPS sets TURBINE_ENABLED := false, which triggers
an issue where a dependency is added on classes-header.jar but
there is no rule to create it.  Skip creating the dependency
when TURBINE_ENABLED is false for now.

Bug: 123183568
Test: m TARGET_PRODUCT=mainline_modules_arm UNBUNDLED_BUILD_SDKS_FROM_SOURCE=true TARGET_BUILD_APPS=com.android.media
Change-Id: I8ec3e244b8f9618c58f4ac57329a5a07f01dc797
diff --git a/core/soong_java_prebuilt.mk b/core/soong_java_prebuilt.mk
index ad1bfce..66410e1 100644
--- a/core/soong_java_prebuilt.mk
+++ b/core/soong_java_prebuilt.mk
@@ -95,7 +95,10 @@
 
     $(eval $(call copy-one-file,$(LOCAL_SOONG_DEX_JAR),$(common_javalib.jar)))
     $(eval $(call add-dependency,$(LOCAL_BUILT_MODULE),$(common_javalib.jar)))
-    $(eval $(call add-dependency,$(common_javalib.jar),$(full_classes_jar) $(full_classes_header_jar)))
+    $(eval $(call add-dependency,$(common_javalib.jar),$(full_classes_jar)))
+    ifneq ($(TURBINE_ENABLED),false)
+      $(eval $(call add-dependency,$(common_javalib.jar),$(full_classes_header_jar)))
+    endif
   endif
 
   java-dex : $(LOCAL_BUILT_MODULE)