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:
committed by
Raphael Moll
parent
a3b1c78767
commit
bea50d3562
@@ -4,7 +4,11 @@
|
||||
ALL_SDK_FILES += $(patsubst \
|
||||
$(TOPDIR)development/sdk/%_source.prop_template, \
|
||||
$(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
|
||||
# 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))/' \
|
||||
$< > $@
|
||||
|
||||
$(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 =====
|
||||
|
||||
|
||||
@@ -152,7 +152,7 @@ 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,
|
||||
# (see web_docs_sample_code_flags in frameworks/base/Android.mk)
|
||||
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.
|
||||
#
|
||||
|
||||
4
samples/samples_source.prop_template
Normal file
4
samples/samples_source.prop_template
Normal file
@@ -0,0 +1,4 @@
|
||||
Pkg.UserSrc=false
|
||||
Pkg.Revision=1
|
||||
AndroidVersion.ApiLevel=${PLATFORM_SDK_VERSION}
|
||||
AndroidVersion.CodeName=${PLATFORM_VERSION_CODENAME}
|
||||
@@ -1,4 +0,0 @@
|
||||
Pkg.UserSrc=false
|
||||
Pkg.Revision=1
|
||||
AndroidVersion.ApiLevel=15
|
||||
#AndroidVersion.CodeName=
|
||||
@@ -1,5 +1,5 @@
|
||||
Pkg.UserSrc=false
|
||||
Pkg.Revision=6
|
||||
Pkg.Revision=8
|
||||
Extra.Vendor=android
|
||||
Extra.Path=support
|
||||
Extra.OldPaths=compatibility
|
||||
|
||||
Reference in New Issue
Block a user