t/oxr_android: Set package version from Git

This commit is contained in:
Ryan Pavlik 2020-10-30 16:15:24 -05:00
parent 36a9273db2
commit 55eab2d79b
2 changed files with 10 additions and 2 deletions

View file

@ -15,6 +15,9 @@ buildscript {
plugins {
// Used for getting the eigen dir from local.properties
id 'com.github.b3er.local.properties' version '1.1'
// For getting git describe data and formatting it how Android wants.
id "com.gladed.androidgitversion" version "0.4.13"
}
ext {

View file

@ -4,6 +4,10 @@
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
androidGitVersion {
tagPattern(/^v[0-9]+.*/)
codeFormat = 'MNNPPPBBB'
}
android {
compileSdkVersion project.sharedTargetSdk
buildToolsVersion '30.0.2'
@ -14,8 +18,9 @@ android {
applicationId 'org.freedesktop.monado.openxr_runtime'
minSdkVersion project.sharedMinSdk
targetSdkVersion project.sharedTargetSdk
versionCode 1
versionName '1.0'
versionCode androidGitVersion.code()
versionName androidGitVersion.name()
externalNativeBuild {
cmake {
arguments "-DEIGEN3_INCLUDE_DIR=${project.eigenIncludeDir}", "-DANDROID_PLATFORM=26", "-DANDROID_STL=c++_shared", "-DANDROID_ARM_NEON=TRUE"