From 1efaf37cb7dda6807f66062ca6bf001f5066e4b4 Mon Sep 17 00:00:00 2001 From: Alan Viverette Date: Thu, 22 Mar 2018 14:07:58 -0400 Subject: [PATCH] Always statically include Support Libraries, move SDK definitions up a dir Bug: 73250914 Bug: 74248169 Test: make && make cts Change-Id: Id7198997ac5cacf76fd8ab155a60026d65e420ec --- core/project_definitions.mk | 4 ++-- core/support_libraries.mk | 15 +++++++-------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/core/project_definitions.mk b/core/project_definitions.mk index 68572eb84..5728b677e 100644 --- a/core/project_definitions.mk +++ b/core/project_definitions.mk @@ -19,6 +19,6 @@ # # -# Include definitions for Support Library modules, if present. +# Include definitions for prebuilt SDK, if present. # --include prebuilts/sdk/current/support/definitions.mk +-include prebuilts/sdk/current/definitions.mk diff --git a/core/support_libraries.mk b/core/support_libraries.mk index e204cc415..f1b86f421 100644 --- a/core/support_libraries.mk +++ b/core/support_libraries.mk @@ -35,16 +35,15 @@ support_java_deps := # its output in the variables support_android_deps and support_java_deps. include $(RESOLVE_SUPPORT_LIBRARIES) -# Store the expanded dependencies in the appropriate variables. Libraries -# should NEVER statically include Support Library modules with resources. +# Everything is static, which simplifies resource handling. Don't write to any +# vars unless we actually have data, since even an empty ANDROID_LIBRARIES var +# requires an AndroidManifest.xml file! ifdef support_android_deps - ifdef LOCAL_IS_STATIC_JAVA_LIBRARY - LOCAL_SHARED_ANDROID_LIBRARIES += $(support_android_deps) - else - LOCAL_STATIC_ANDROID_LIBRARIES += $(support_android_deps) - endif # LOCAL_IS_STATIC_JAVA_LIBRARY + LOCAL_STATIC_ANDROID_LIBRARIES += $(support_android_deps) endif #support_android_deps -LOCAL_STATIC_JAVA_LIBRARIES += $(support_java_deps) +ifdef support_java_deps + LOCAL_STATIC_JAVA_LIBRARIES += $(support_java_deps) +endif #support_java_deps # We have consumed these values. Clean them up. support_android_deps :=