From 39a92e72d4fa0fa9bf3a38b6bef5f708a67c1379 Mon Sep 17 00:00:00 2001 From: Lennart Goedhart <lennart@omnibase.com.au> Date: Sat, 1 Jul 2017 21:43:25 +0800 Subject: [PATCH] - Fixed Gradle Task.leftShift(Closure) deprecation warning - Update Fabric to latest --- app/build.gradle | 96 ++++++++++++++++++++++++++---------------------- 1 file changed, 52 insertions(+), 44 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 68e1d9d..b4d22ec 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -7,7 +7,7 @@ buildscript { } dependencies { - classpath 'io.fabric.tools:gradle:1.21.6' + classpath 'io.fabric.tools:gradle:1.22.2' classpath 'io.realm:realm-gradle-plugin:3.4.0' classpath 'org.ajoberstar:grgit:1.5.0' } @@ -88,52 +88,56 @@ android { } } -task signRelease << { - def command = [ - 'jarsigner', - '-verbose', - '-sigalg', - 'SHA1withRSA', - '-digestalg', - 'SHA1', - '-keystore', - '/Users/lennart/keystores/nightscout_android.jks', - 'app/build/outputs/apk/app-release-unsigned.apk', - 'nightscoutandroidkey' - ] - - def proc = new ProcessBuilder(command) - .redirectOutput(ProcessBuilder.Redirect.INHERIT) - .redirectInput(ProcessBuilder.Redirect.INHERIT) - .redirectError(ProcessBuilder.Redirect.INHERIT) - .start() - - proc.waitFor() - - if (0 != proc.exitValue()) { - throw new RuntimeException("Could not sign APK.") +task signRelease { + doLast { + def command = [ + 'jarsigner', + '-verbose', + '-sigalg', + 'SHA1withRSA', + '-digestalg', + 'SHA1', + '-keystore', + '/Users/lennart/keystores/nightscout_android.jks', + 'app/build/outputs/apk/app-release-unsigned.apk', + 'nightscoutandroidkey' + ] + + def proc = new ProcessBuilder(command) + .redirectOutput(ProcessBuilder.Redirect.INHERIT) + .redirectInput(ProcessBuilder.Redirect.INHERIT) + .redirectError(ProcessBuilder.Redirect.INHERIT) + .start() + + proc.waitFor() + + if (0 != proc.exitValue()) { + throw new RuntimeException("Could not sign APK.") + } } } -task zipalignRelease << { - def command = [ - '/Users/lennart/Library/Android/sdk/build-tools/25.0.2/zipalign', - '-v', - '4', - 'app/build/outputs/apk/app-release-unsigned.apk', - 'app/build/outputs/apk/600-series-uploader.apk' - ] - - def proc = new ProcessBuilder(command) - .redirectOutput(ProcessBuilder.Redirect.INHERIT) - .redirectInput(ProcessBuilder.Redirect.INHERIT) - .redirectError(ProcessBuilder.Redirect.INHERIT) - .start() - - proc.waitFor() - - if (0 != proc.exitValue()) { - throw new RuntimeException("Could not align APK.") +task zipalignRelease { + doLast { + def command = [ + '/Users/lennart/Library/Android/sdk/build-tools/25.0.2/zipalign', + '-v', + '4', + 'app/build/outputs/apk/app-release-unsigned.apk', + 'app/build/outputs/apk/600-series-uploader.apk' + ] + + def proc = new ProcessBuilder(command) + .redirectOutput(ProcessBuilder.Redirect.INHERIT) + .redirectInput(ProcessBuilder.Redirect.INHERIT) + .redirectError(ProcessBuilder.Redirect.INHERIT) + .start() + + proc.waitFor() + + if (0 != proc.exitValue()) { + throw new RuntimeException("Could not align APK.") + } } } @@ -161,6 +165,10 @@ dependencies { compile 'com.squareup.retrofit2:retrofit:2.1.0' compile 'com.squareup.retrofit2:converter-gson:2.1.0' + compile('com.crashlytics.sdk.android:crashlytics:2.6.8@aar') { + transitive = true; + } + // The version of okhttp3 *must* be the same as the version in AppUpdater compile 'com.squareup.okhttp3:okhttp:3.6.0' compile 'com.squareup.okhttp3:logging-interceptor:3.6.0' -- GitLab