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

 

 

你可能感兴趣的:(android,user,Integer,Build,Perforce,Numbers)