From 6b704f5059ebd12478fcaac8e4d157b30a3e1aa2 Mon Sep 17 00:00:00 2001 From: Tim Mutton Date: Mon, 20 Mar 2017 20:48:07 +1100 Subject: [PATCH 1/7] Update to latest libraries, use correct version name --- Source/Android/app/build.gradle | 23 ++++++++++++------- .../app/src/main/res/values/strings.xml | 3 --- Source/Android/build.gradle | 5 ---- 3 files changed, 15 insertions(+), 16 deletions(-) diff --git a/Source/Android/app/build.gradle b/Source/Android/app/build.gradle index d7590156e4..7d3f59dfc6 100644 --- a/Source/Android/app/build.gradle +++ b/Source/Android/app/build.gradle @@ -21,10 +21,9 @@ android { targetSdkVersion 25 // TODO This should be set to the Buildbot build number for release builds, and be "1" for debug builds. - versionCode 13 + versionCode 1 - // TODO This should be set to the string currently provided by NativeLibrary.GetVersionString(). - versionName "0.13" + versionName "${getVersion()}" } signingConfigs { @@ -71,14 +70,18 @@ android { } } +ext { + androidSupportVersion = '25.2.0' +} + dependencies { - compile 'com.android.support:support-v13:25.3.0' - compile 'com.android.support:cardview-v7:25.3.0' - compile 'com.android.support:recyclerview-v7:25.3.0' - compile 'com.android.support:design:25.3.0' + compile "com.android.support:support-v13:$androidSupportVersion" + compile "com.android.support:cardview-v7:$androidSupportVersion" + compile "com.android.support:recyclerview-v7:$androidSupportVersion" + compile "com.android.support:design:$androidSupportVersion" // Android TV UI libraries. - compile 'com.android.support:leanback-v17:25.3.0' + compile "com.android.support:leanback-v17:$androidSupportVersion" // For showing the banner as a circle a-la Material Design Guidelines compile 'de.hdodenhof:circleimageview:2.1.0' @@ -89,3 +92,7 @@ dependencies { // Allows FRP-style asynchronous operations in Android. compile 'io.reactivex:rxandroid:1.2.1' } + +def getVersion() { + return 'git describe --abbrev=0'.execute([], project.rootDir).text.trim() +} diff --git a/Source/Android/app/src/main/res/values/strings.xml b/Source/Android/app/src/main/res/values/strings.xml index fcc9e80ed4..c85d00df52 100644 --- a/Source/Android/app/src/main/res/values/strings.xml +++ b/Source/Android/app/src/main/res/values/strings.xml @@ -239,8 +239,5 @@ General Controllers - - org.dolphinemu.dolphinemu - You need to allow write access to external storage for the emulator to work diff --git a/Source/Android/build.gradle b/Source/Android/build.gradle index c6f2f5009e..3f806cd79c 100644 --- a/Source/Android/build.gradle +++ b/Source/Android/build.gradle @@ -1,14 +1,9 @@ -// Top-level build file where you can add configuration options common to all sub-projects/modules. - buildscript { repositories { jcenter() } dependencies { classpath 'com.android.tools.build:gradle:2.3.0' - - // NOTE: Do not place your application dependencies here; they belong - // in the individual module build.gradle files } } From 3d95bf0837b386ff0cd96f9a4c47e4a9f2437ec9 Mon Sep 17 00:00:00 2001 From: Tim Mutton Date: Mon, 20 Mar 2017 21:25:23 +1100 Subject: [PATCH 2/7] Revert change to version code until I can work out why its 13 --- Source/Android/app/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Android/app/build.gradle b/Source/Android/app/build.gradle index 7d3f59dfc6..870f6e71e1 100644 --- a/Source/Android/app/build.gradle +++ b/Source/Android/app/build.gradle @@ -21,7 +21,7 @@ android { targetSdkVersion 25 // TODO This should be set to the Buildbot build number for release builds, and be "1" for debug builds. - versionCode 1 + versionCode 13 versionName "${getVersion()}" } From 8908d100284eb9ae38f73a916a6b55bcb2f1e3ba Mon Sep 17 00:00:00 2001 From: Tim Mutton Date: Mon, 20 Mar 2017 23:09:33 +1100 Subject: [PATCH 3/7] Use different git command for version name --- Source/Android/app/build.gradle | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Source/Android/app/build.gradle b/Source/Android/app/build.gradle index 870f6e71e1..44e5bc5644 100644 --- a/Source/Android/app/build.gradle +++ b/Source/Android/app/build.gradle @@ -94,5 +94,7 @@ dependencies { } def getVersion() { - return 'git describe --abbrev=0'.execute([], project.rootDir).text.trim() + return 'git describe --always --long'.execute([], project.rootDir).text + .trim() + .replaceAll(/(-0)?-[^-]+$/, "") } From c8d66fa2467655d89b89818e12bd2796be0c64af Mon Sep 17 00:00:00 2001 From: Tim Mutton Date: Fri, 24 Mar 2017 14:33:12 +1100 Subject: [PATCH 4/7] Nix and windows variant of getting tag --- Source/Android/app/build.gradle | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/Source/Android/app/build.gradle b/Source/Android/app/build.gradle index 44e5bc5644..ea7165d4d5 100644 --- a/Source/Android/app/build.gradle +++ b/Source/Android/app/build.gradle @@ -1,3 +1,5 @@ +import org.apache.tools.ant.taskdefs.condition.Os + apply plugin: 'com.android.application' android { @@ -94,7 +96,12 @@ dependencies { } def getVersion() { - return 'git describe --always --long'.execute([], project.rootDir).text - .trim() - .replaceAll(/(-0)?-[^-]+$/, "") + String result + if(Os.isFamily(Os.FAMILY_WINDOWS)) { + result = 'cmd /c git describe --always --long'.execute([], project.rootDir).text + } else { + result = 'git describe --always --long'.execute([], project.rootDir).text + } + + return result.trim().replaceAll(/(-0)?-[^-]+$/, "") } From 1fe1e11e0e70daffd4fdb5e24e9784458b8d248c Mon Sep 17 00:00:00 2001 From: Tim Mutton Date: Thu, 6 Apr 2017 19:53:25 +1000 Subject: [PATCH 5/7] Use try/catch with logging for version number --- Source/Android/app/build.gradle | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/Source/Android/app/build.gradle b/Source/Android/app/build.gradle index ea7165d4d5..3f2b90bc6d 100644 --- a/Source/Android/app/build.gradle +++ b/Source/Android/app/build.gradle @@ -1,5 +1,3 @@ -import org.apache.tools.ant.taskdefs.condition.Os - apply plugin: 'com.android.application' android { @@ -96,12 +94,15 @@ dependencies { } def getVersion() { - String result - if(Os.isFamily(Os.FAMILY_WINDOWS)) { - result = 'cmd /c git describe --always --long'.execute([], project.rootDir).text - } else { - result = 'git describe --always --long'.execute([], project.rootDir).text + def versionNumber = '0.0' + + try { + versionNumber = 'git describe --always --long'.execute([], project.rootDir).text + .trim() + .replaceAll(/(-0)?-[^-]+$/, "") + } catch (Exception e) { + logger.error('Cannot find git, defaulting to dummy version number') } - return result.trim().replaceAll(/(-0)?-[^-]+$/, "") + return versionNumber } From 61aa507d235d87b826036101bc72f698f2ee9b13 Mon Sep 17 00:00:00 2001 From: Tim Mutton Date: Thu, 6 Apr 2017 19:53:44 +1000 Subject: [PATCH 6/7] Make apk name more descriptive --- Source/Android/app/build.gradle | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Source/Android/app/build.gradle b/Source/Android/app/build.gradle index 3f2b90bc6d..41b5413eb9 100644 --- a/Source/Android/app/build.gradle +++ b/Source/Android/app/build.gradle @@ -68,6 +68,14 @@ android { } } } + + applicationVariants.all { variant -> + variant.outputs.each { output -> + def name = output.outputFile.name.replace(variant.buildType.name, "${variant.versionName}") + name = name.replace("app", "dolphin") + output.outputFile = new File(output.outputFile.parent, name) + } + } } ext { From 3dde12af13adc345ca72c328e461fa54eab42d8a Mon Sep 17 00:00:00 2001 From: Tim Mutton Date: Thu, 4 May 2017 17:21:31 +1000 Subject: [PATCH 7/7] Update support version --- Source/Android/app/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Android/app/build.gradle b/Source/Android/app/build.gradle index 41b5413eb9..43cb878059 100644 --- a/Source/Android/app/build.gradle +++ b/Source/Android/app/build.gradle @@ -79,7 +79,7 @@ android { } ext { - androidSupportVersion = '25.2.0' + androidSupportVersion = '25.3.0' } dependencies {