[#476] GRPC 1.46.0
This commit is contained in:
parent
e78139fa1a
commit
7d8182d5be
|
@ -99,7 +99,7 @@ ANDROIDX_UI_AUTOMATOR_VERSION=2.2.0-alpha1
|
||||||
BIP39_VERSION=1.0.2
|
BIP39_VERSION=1.0.2
|
||||||
COROUTINES_OKHTTP=1.0
|
COROUTINES_OKHTTP=1.0
|
||||||
GOOGLE_MATERIAL_VERSION=1.6.0-beta01
|
GOOGLE_MATERIAL_VERSION=1.6.0-beta01
|
||||||
GRPC_VERSION=1.45.1
|
GRPC_VERSION=1.46.0
|
||||||
GSON_VERSION=2.9.0
|
GSON_VERSION=2.9.0
|
||||||
GUAVA_VERSION=31.1-android
|
GUAVA_VERSION=31.1-android
|
||||||
JACOCO_VERSION=0.8.8
|
JACOCO_VERSION=0.8.8
|
||||||
|
|
|
@ -204,6 +204,7 @@ dependencies {
|
||||||
// replaced if needed. For compatibility, we match the library version used in grpc-okhttp:
|
// replaced if needed. For compatibility, we match the library version used in grpc-okhttp:
|
||||||
// https://github.com/grpc/grpc-java/blob/v1.37.x/build.gradle#L159
|
// https://github.com/grpc/grpc-java/blob/v1.37.x/build.gradle#L159
|
||||||
implementation(libs.okio)
|
implementation(libs.okio)
|
||||||
|
implementation(libs.okhttp)
|
||||||
|
|
||||||
// Tests
|
// Tests
|
||||||
testImplementation(libs.kotlin.reflect)
|
testImplementation(libs.kotlin.reflect)
|
||||||
|
|
|
@ -2,10 +2,10 @@ package cash.z.ecc.android.sdk.internal
|
||||||
|
|
||||||
import cash.z.ecc.android.sdk.exception.TransactionEncoderException
|
import cash.z.ecc.android.sdk.exception.TransactionEncoderException
|
||||||
import cash.z.ecc.android.sdk.ext.ZcashSdk
|
import cash.z.ecc.android.sdk.ext.ZcashSdk
|
||||||
import com.squareup.okhttp.OkHttpClient
|
|
||||||
import com.squareup.okhttp.Request
|
|
||||||
import kotlinx.coroutines.Dispatchers
|
import kotlinx.coroutines.Dispatchers
|
||||||
import kotlinx.coroutines.withContext
|
import kotlinx.coroutines.withContext
|
||||||
|
import okhttp3.OkHttpClient
|
||||||
|
import okhttp3.Request
|
||||||
import okio.buffer
|
import okio.buffer
|
||||||
import okio.sink
|
import okio.sink
|
||||||
import java.io.File
|
import java.io.File
|
||||||
|
@ -70,9 +70,13 @@ class SaplingParamTool {
|
||||||
file.parentFile?.mkdirsSuspend()
|
file.parentFile?.mkdirsSuspend()
|
||||||
}
|
}
|
||||||
withContext(Dispatchers.IO) {
|
withContext(Dispatchers.IO) {
|
||||||
file.sink().buffer().use {
|
response.body?.let { body ->
|
||||||
|
body.source().use { source ->
|
||||||
|
file.sink().buffer().use { sink ->
|
||||||
twig("writing to $file")
|
twig("writing to $file")
|
||||||
it.writeAll(response.body().source())
|
sink.writeAll(source)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue