SDK repo: use a template for samples/source.properties.

Use a template for samples/source.properties so that it automatically
picks up the current platform API level.

Also merges 52feec594a
("Update rev numbers of SDK packages.")

Change-Id: I89574842d2b0290cc6cf454f82a3721644cae0f0
This commit is contained in:
Xavier Ducrohet
2012-02-15 18:31:46 -08:00
committed by Raphael Moll
parent a3b1c78767
commit bea50d3562
5 changed files with 20 additions and 8 deletions

View File

@@ -4,7 +4,11 @@
ALL_SDK_FILES += $(patsubst \ ALL_SDK_FILES += $(patsubst \
$(TOPDIR)development/sdk/%_source.prop_template, \ $(TOPDIR)development/sdk/%_source.prop_template, \
$(HOST_OUT)/development/sdk/%_source.properties, \ $(HOST_OUT)/development/sdk/%_source.properties, \
$(wildcard $(TOPDIR)development/sdk/*_source.prop_template)) $(wildcard $(TOPDIR)development/sdk/*_source.prop_template)) \
$(patsubst \
$(TOPDIR)development/samples/%_source.prop_template, \
$(HOST_OUT)/development/samples/%_source.properties, \
$(wildcard $(TOPDIR)development/samples/*_source.prop_template))
# Rule to convert a source.prop template into the desired source.property # Rule to convert a source.prop template into the desired source.property
# Rewritten variables: # Rewritten variables:
@@ -19,6 +23,14 @@ $(HOST_OUT)/development/sdk/%_source.properties : $(TOPDIR)development/sdk/%_sou
-e 's/$${PLATFORM_VERSION_CODENAME}/$(subst REL,,$(PLATFORM_VERSION_CODENAME))/' \ -e 's/$${PLATFORM_VERSION_CODENAME}/$(subst REL,,$(PLATFORM_VERSION_CODENAME))/' \
$< > $@ $< > $@
$(HOST_OUT)/development/samples/%_source.properties : $(TOPDIR)development/samples/%_source.prop_template
@echo Generate $@
$(hide) mkdir -p $(dir $@)
$(hide) sed -e 's/$${PLATFORM_VERSION}/$(PLATFORM_VERSION)/' \
-e 's/$${PLATFORM_SDK_VERSION}/$(PLATFORM_SDK_VERSION)/' \
-e 's/$${PLATFORM_VERSION_CODENAME}/$(subst REL,,$(PLATFORM_VERSION_CODENAME))/' \
$< > $@
# ===== Android Support/Compatibility Library ===== # ===== Android Support/Compatibility Library =====

View File

@@ -151,8 +151,8 @@ frameworks/base/docs/docs-samples-redirect.html docs/samples/index.html
# #
# the list here should match the list of samples that we generate docs for, # the list here should match the list of samples that we generate docs for,
# (see web_docs_sample_code_flags in frameworks/base/Android.mk) # (see web_docs_sample_code_flags in frameworks/base/Android.mk)
development/apps/GestureBuilder samples/${PLATFORM_NAME}/GestureBuilder development/apps/GestureBuilder samples/${PLATFORM_NAME}/GestureBuilder
development/samples/source.properties samples/${PLATFORM_NAME}/source.properties development/samples/samples_source.properties samples/${PLATFORM_NAME}/source.properties
# #
# PLEASE KEEP THE SAMPLES IN ALPHABETICAL ORDER. # PLEASE KEEP THE SAMPLES IN ALPHABETICAL ORDER.
# #

View File

@@ -0,0 +1,4 @@
Pkg.UserSrc=false
Pkg.Revision=1
AndroidVersion.ApiLevel=${PLATFORM_SDK_VERSION}
AndroidVersion.CodeName=${PLATFORM_VERSION_CODENAME}

View File

@@ -1,4 +0,0 @@
Pkg.UserSrc=false
Pkg.Revision=1
AndroidVersion.ApiLevel=15
#AndroidVersion.CodeName=

View File

@@ -1,5 +1,5 @@
Pkg.UserSrc=false Pkg.UserSrc=false
Pkg.Revision=6 Pkg.Revision=8
Extra.Vendor=android Extra.Vendor=android
Extra.Path=support Extra.Path=support
Extra.OldPaths=compatibility Extra.OldPaths=compatibility