Use git version as library_version

This commit is contained in:
Gregor Richards
2016-12-09 17:38:47 -05:00
parent 41fa98853f
commit 9b41cfb099
3 changed files with 12 additions and 0 deletions

View File

@@ -1,4 +1,8 @@
LOCAL_PATH := $(call my-dir)
GIT_VERSION := " $(shell git rev-parse --short HEAD || echo unknown)"
ifneq ($(GIT_VERSION)," unknown")
LOCAL_CFLAGS += -DGIT_VERSION=\"$(GIT_VERSION)\"
endif
include $(CLEAR_VARS)