android 查看sdk源码,如何查看Android SDK源码版本

PLATFORM_VERSION := 4.2.2

位于/build/core/version_defaults.mk

#

# Copyright (C) 2008 The Android Open Source Project

#

# Licensed under the Apache License, Version 2.0 (the "License");

# you may not use this file except in compliance with the License.

# You may obtain a copy of the License at

#

# http://www.apache.org/licenses/LICENSE-2.0

#

# Unless required by applicable law or agreed to in writing, software

# distributed under the License is distributed on an "AS IS" BASIS,

# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

# See the License for the specific language governing permissions and

# limitations under the License.

#

#

# Handle various build version information.

#

# Guarantees that the following are defined:

# PLATFORM_VERSION

# PLATFORM_SDK_VERSION

# PLATFORM_VERSION_CODENAME

# DEFAULT_APP_TARGET_SDK

# BUILD_ID

# BUILD_NUMBER

#

# Look for an optional file containing overrides of the defaults,

# but don't cry if we don't find it. We could just use -include, but

# the build.prop target also wants INTERNAL_BUILD_ID_MAKEFILE to be set

# if the file exists.

#

INTERNAL_BUILD_ID_MAKEFILE := $(wildcard $(BUILD_SYSTEM)/build_id.mk)

ifneq "" "$(INTERNAL_BUILD_ID_MAKEFILE)"

include $(INTERNAL_BUILD_ID_MAKEFILE)

endif

ifeq "" "$(PLATFORM_VERSION)"

# This is the canonical definition of the platform version,

# which is the version that we reveal to the end user.

# Update this value when the platform version changes (rather

# than overriding it somewhere else). Can be an arbitrary string.

PLATFORM_VERSION := 4.2.2 # SDK Version

endif

ifeq "" "$(PLATFORM_SDK_VERSION)"

# This is the canonical definition of the SDK version, which defines

# the set of APIs and functionality available in the platform. It

# is a single integer that increases monotonically as updates to

# the SDK are released. It should only be incremented when the APIs for

# the new release are frozen (so that developers don't write apps against

# intermediate builds). During development, this number remains at the

# SDK version the branch is based on and PLATFORM_VERSION_CODENAME holds

# the code-name of the new development work.

PLATFORM_SDK_VERSION := 17 #API Level

endif

ifeq "" "$(PLATFORM_VERSION_CODENAME)"

# This is the current development code-name, if the build is not a final

# release build. If this is a final release build, it is simply "REL".

PLATFORM_VERSION_CODENAME := REL

endif

ifeq "" "$(DEFAULT_APP_TARGET_SDK)"

# This is the default minSdkVersion and targetSdkVersion to use for

# all .apks created by the build system. It can be overridden by explicitly

# setting these in the .apk's AndroidManifest.xml. It is either the code

# name of the development build or, if this is a release build, the official

# SDK version of this release.

ifeq "REL" "$(PLATFORM_VERSION_CODENAME)"

DEFAULT_APP_TARGET_SDK := $(PLATFORM_SDK_VERSION)

else

DEFAULT_APP_TARGET_SDK := $(PLATFORM_VERSION_CODENAME)

endif

endif

ifeq "" "$(BUILD_ID)"

# Used to signify special builds. E.g., branches and/or releases,

# like "M5-RC7". Can be an arbitrary string, but must be a single

# word and a valid file name.

#

# If there is no BUILD_ID set, make it obvious.

BUILD_ID := UNKNOWN

endif

ifeq "" "$(BUILD_NUMBER)"

# BUILD_NUMBER should be set to the source control value that

# represents the current state of the source code. E.g., a

# perforce changelist number or a git hash. Can be an arbitrary string

# (to allow for source control that uses something other than numbers),

# but must be a single word and a valid file name.

#

# If no BUILD_NUMBER is set, create a useful "I am an engineering build

# from this date/time" value. Make it start with a non-digit so that

# anyone trying to parse it as an integer will probably get "0".

BUILD_NUMBER := eng.$(USER).$(shell date +%Y%m%d.%H%M%S)

endif

root@idong:/home/hejian/rk3066-4.2/build/core#

root@idong:/home/hejian/rk3066-4.2/build/core# cat version_defaults.mk

#

# Copyright (C) 2008 The Android Open Source Project

#

# Licensed under the Apache License, Version 2.0 (the "License");

# you may not use this file except in compliance with the License.

# You may obtain a copy of the License at

#

# http://www.apache.org/licenses/LICENSE-2.0

#

# Unless required by applicable law or agreed to in writing, software

# distributed under the License is distributed on an "AS IS" BASIS,

# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

# See the License for the specific language governing permissions and

# limitations under the License.

#

#

# Handle various build version information.

#

# Guarantees that the following are defined:

# PLATFORM_VERSION

# PLATFORM_SDK_VERSION

# PLATFORM_VERSION_CODENAME

# DEFAULT_APP_TARGET_SDK

# BUILD_ID

# BUILD_NUMBER

#

# Look for an optional file containing overrides of the defaults,

# but don't cry if we don't find it. We could just use -include, but

# the build.prop target also wants INTERNAL_BUILD_ID_MAKEFILE to be set

# if the file exists.

#

INTERNAL_BUILD_ID_MAKEFILE := $(wildcard $(BUILD_SYSTEM)/build_id.mk)

ifneq "" "$(INTERNAL_BUILD_ID_MAKEFILE)"

include $(INTERNAL_BUILD_ID_MAKEFILE)

endif

ifeq "" "$(PLATFORM_VERSION)"

# This is the canonical definition of the platform version,

# which is the version that we reveal to the end user.

# Update this value when the platform version changes (rather

# than overriding it somewhere else). Can be an arbitrary string.

PLATFORM_VERSION := 4.2.2

endif

ifeq "" "$(PLATFORM_SDK_VERSION)"

# This is the canonical definition of the SDK version, which defines

# the set of APIs and functionality available in the platform. It

# is a single integer that increases monotonically as updates to

# the SDK are released. It should only be incremented when the APIs for

# the new release are frozen (so that developers don't write apps against

# intermediate builds). During development, this number remains at the

# SDK version the branch is based on and PLATFORM_VERSION_CODENAME holds

# the code-name of the new development work.

PLATFORM_SDK_VERSION := 17

endif

ifeq "" "$(PLATFORM_VERSION_CODENAME)"

# This is the current development code-name, if the build is not a final

# release build. If this is a final release build, it is simply "REL".

PLATFORM_VERSION_CODENAME := REL

endif

ifeq "" "$(DEFAULT_APP_TARGET_SDK)"

# This is the default minSdkVersion and targetSdkVersion to use for

# all .apks created by the build system. It can be overridden by explicitly

# setting these in the .apk's AndroidManifest.xml. It is either the code

# name of the development build or, if this is a release build, the official

# SDK version of this release.

ifeq "REL" "$(PLATFORM_VERSION_CODENAME)"

DEFAULT_APP_TARGET_SDK := $(PLATFORM_SDK_VERSION)

else

DEFAULT_APP_TARGET_SDK := $(PLATFORM_VERSION_CODENAME)

endif

endif

ifeq "" "$(BUILD_ID)"

# Used to signify special builds. E.g., branches and/or releases,

# like "M5-RC7". Can be an arbitrary string, but must be a single

# word and a valid file name.

#

# If there is no BUILD_ID set, make it obvious.

BUILD_ID := UNKNOWN

endif

ifeq "" "$(BUILD_NUMBER)"

# BUILD_NUMBER should be set to the source control value that

# represents the current state of the source code. E.g., a

# perforce changelist number or a git hash. Can be an arbitrary string

# (to allow for source control that uses something other than numbers),

# but must be a single word and a valid file name.

#

# If no BUILD_NUMBER is set, create a useful "I am an engineering build

# from this date/time" value. Make it start with a non-digit so that

# anyone trying to parse it as an integer will probably get "0".

BUILD_NUMBER := eng.$(USER).$(shell date +%Y%m%d.%H%M%S)

endif

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值