Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4ff08f6b authored by Sundong Ahn's avatar Sundong Ahn
Browse files

Change the "since" arguments generation.

If we add a new sdk library starting with android, there is a build
error because of the wrong "since" argument. So we have to change to
android.txt and android.xml instead of android.* in since-arg.

Bug: 77577799
Test: Verified variable is the same before & after.
Change-Id: I3016181a97e565ebba67c1828d76ddf9a7d6f860
parent 3c1604da
Loading
Loading
Loading
Loading
+9 −7
Original line number Diff line number Diff line
@@ -180,15 +180,17 @@ framework_docs_LOCAL_DROIDDOC_OPTIONS := \
    -hidePackage com.android.server

# Convert an sdk level to a "since" argument.
since-arg = -since $(wildcard $(HISTORICAL_SDK_VERSIONS_ROOT)/$(1)/public/api/android.*) $(1)
since-arg = -since $(wildcard $(HISTORICAL_SDK_VERSIONS_ROOT)/$(1)/public/api/android.$(2)) $(1)

finalized_sdks := $(patsubst $(HISTORICAL_SDK_VERSIONS_ROOT)/%/public/api/android.xml,%,\
    $(wildcard $(HISTORICAL_SDK_VERSIONS_ROOT)/*/public/api/android.xml))
finalized_sdks += $(patsubst $(HISTORICAL_SDK_VERSIONS_ROOT)/%/public/api/android.txt,%,\
    $(wildcard $(HISTORICAL_SDK_VERSIONS_ROOT)/*/public/api/android.txt))
finalized_sdks := $(call numerically_sort,$(finalized_sdks))
finalized_xml_sdks := $(call numerically_sort,\
    $(patsubst $(HISTORICAL_SDK_VERSIONS_ROOT)/%/public/api/android.xml,%,\
    $(wildcard $(HISTORICAL_SDK_VERSIONS_ROOT)/*/public/api/android.xml)))
finalized_txt_sdks := $(call numerically_sort,\
     $(patsubst $(HISTORICAL_SDK_VERSIONS_ROOT)/%/public/api/android.txt,%,\
    $(wildcard $(HISTORICAL_SDK_VERSIONS_ROOT)/*/public/api/android.txt)))

framework_docs_LOCAL_DROIDDOC_OPTIONS += $(foreach sdk,$(finalized_sdks),$(call since-arg,$(sdk)))
framework_docs_LOCAL_DROIDDOC_OPTIONS += $(foreach sdk,$(finalized_xml_sdks),$(call since-arg,$(sdk),xml))
framework_docs_LOCAL_DROIDDOC_OPTIONS += $(foreach sdk,$(finalized_txt_sdks),$(call since-arg,$(sdk),txt))
ifneq ($(PLATFORM_VERSION_CODENAME),REL)
  framework_docs_LOCAL_DROIDDOC_OPTIONS += \
      -since ./frameworks/base/api/current.txt $(PLATFORM_VERSION_CODENAME)