From 2fb4385a04d73f66385b325e97ac6cc40339db48 Mon Sep 17 00:00:00 2001 From: Marvin W Date: Sun, 7 Feb 2016 11:13:26 +0100 Subject: [PATCH] Update build-tools, adjust versioning scheme, add permission --- .travis.yml | 5 ++-- services-framework-proxy/build.gradle | 27 +++++++++++++++++-- .../src/main/AndroidManifest.xml | 15 +++++------ 3 files changed, 35 insertions(+), 12 deletions(-) diff --git a/.travis.yml b/.travis.yml index 1b3be81..5b09d88 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,8 +10,9 @@ script: - ./gradlew assembleDebug -x lint android: components: - - extra-android-m2repository - - build-tools-23.0.1 + - tools + - build-tools-23.0.2 - android-23 + - extra-android-m2repository diff --git a/services-framework-proxy/build.gradle b/services-framework-proxy/build.gradle index d9fbced..6824f94 100644 --- a/services-framework-proxy/build.gradle +++ b/services-framework-proxy/build.gradle @@ -19,15 +19,38 @@ buildscript { mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:1.3.0' + classpath 'com.android.tools.build:gradle:1.5.0' } } apply plugin: 'com.android.application' +String getMyVersionName() { + def stdout = new ByteArrayOutputStream() + exec { + commandLine 'git', 'describe', '--tags', '--always', '--dirty' + standardOutput = stdout + } + return stdout.toString().trim() +} + +int getMyVersionCode() { + def stdout = new ByteArrayOutputStream() + exec { + commandLine 'git', 'rev-list', '--count', "HEAD" + standardOutput = stdout + } + return Integer.parseInt(stdout.toString().trim()) +} + android { compileSdkVersion 23 - buildToolsVersion "23.0.1" + buildToolsVersion "23.0.2" + + defaultConfig { + versionName getMyVersionName() + versionCode getMyVersionCode() + } } if (file('user.gradle').exists()) { diff --git a/services-framework-proxy/src/main/AndroidManifest.xml b/services-framework-proxy/src/main/AndroidManifest.xml index 9bb09da..670585a 100644 --- a/services-framework-proxy/src/main/AndroidManifest.xml +++ b/services-framework-proxy/src/main/AndroidManifest.xml @@ -1,14 +1,13 @@ - + + android:targetSdkVersion="23"/> - + + - + - +