Update dependencies

This commit is contained in:
Mygod
2018-09-11 18:17:39 +08:00
parent 90fdb68857
commit ce286ccd01
3 changed files with 5 additions and 7 deletions

View File

@@ -4,7 +4,7 @@ apply plugin: 'com.github.ben-manes.versions'
buildscript {
ext {
androidPluginVersion = '3.2.0-rc02'
androidPluginVersion = '3.2.0-rc03'
kotlinVersion = '1.2.61'
androidxVersion = '1.0.0-rc02'
}

View File

@@ -49,7 +49,7 @@ dependencies {
implementation 'com.android.billingclient:billing:1.1'
implementation 'com.crashlytics.sdk.android:crashlytics:2.9.5'
implementation 'com.github.luongvo:BadgeView:1.1.5'
implementation 'com.github.topjohnwu:libsu:2.0.1'
implementation 'com.github.topjohnwu:libsu:2.0.2'
implementation "com.google.android.material:material:$androidxVersion"
implementation 'com.linkedin.dexmaker:dexmaker-mockito:2.19.1'
implementation 'com.takisoft.preferencex:preferencex:1.0.0-alpha2'
@@ -59,5 +59,4 @@ dependencies {
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0-alpha4'
}
kapt.generateStubs = true
apply plugin: 'com.google.gms.google-services'

View File

@@ -56,12 +56,11 @@ class RootSession : AutoCloseable {
class UnexpectedOutputException(msg: String) : RuntimeException(msg)
private fun checkOutput(command: String, result: Shell.Result, out: Boolean = result.out.isNotEmpty(),
err: Boolean = stderr.isNotEmpty()) {
err: Boolean = result.err.isNotEmpty()) {
if (result.isSuccess && !out && !err) return
val msg = StringBuilder("$command exited with ${result.code}")
if (out) result.out.forEach { msg.append("\n$it") }
// TODO bug: https://github.com/topjohnwu/libsu/pull/23
if (err) stderr.forEach { msg.append("\nE $it") }
if (err) result.err.forEach { msg.append("\nE $it") }
throw UnexpectedOutputException(msg.toString())
}
@@ -89,7 +88,7 @@ class RootSession : AutoCloseable {
fun submit(command: String) {
val result = execQuiet(command)
if (result.code != 0) Crashlytics.log(Log.VERBOSE, TAG, "$command exited with ${result.code}")
var msg = stderr.joinToString("\n").trim()
var msg = result.err.joinToString("\n").trim()
if (msg.isNotEmpty()) Crashlytics.log(Log.VERBOSE, TAG, msg)
msg = result.out.joinToString("\n").trim()
if (msg.isNotEmpty()) Crashlytics.log(Log.VERBOSE, TAG, msg)