android 设置编译版本信息,Android 编译系统 --- 版本信息

TARGET_BUILD_VARIANT := user

BUILD_NUMBER := 20100803.173200 #版本号,用编译时间作为版本号

BUILD_ID := FROYO #Android 版本代码

如果BUILD_NUMBER没有设置,则会有一个显示"eng.$(USER).$(shell date +%Y%m%d.%H%M%S)"

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

如果TARGET_BUILD_VARIANT 没有设置成user,则setting里面就会显示 “build_desc“的信息

ifeq ($(TARGET_BUILD_VARIANT),user)

# User builds should show:

# release build number or branch.buld_number non-release builds

# Dev. branches should have DISPLAY_BUILD_NUMBER set

ifeq "true" "$(DISPLAY_BUILD_NUMBER)"

BUILD_DISPLAY_ID := $(BUILD_ID).$(BUILD_NUMBER)

else

BUILD_DISPLAY_ID := $(BUILD_ID)

endif

else

# Non-user builds should show detailed build information

BUILD_DISPLAY_ID := $(build_desc)

endif

build_desc设置如下:

build_desc := $(TARGET_PRODUCT)-$(TARGET_BUILD_VARIANT) $(PLATFORM_VERSION) $(BUILD_ID) $(BUILD_NUMBER) $(BUILD_VERSION_TAGS)

BUILD_VERSION_TAGS := test-keys

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值