diff --git a/app/build.gradle b/app/build.gradle index 183c0172..663cbda2 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -12,8 +12,8 @@ android { applicationId = "info.dvkr.screenstream" minSdkVersion(21) targetSdkVersion(30) - versionCode = 30602 - versionName = "3.6.2" + versionCode = 30603 + versionName = "3.6.3" resConfigs("en", "ru", "pt-rBR", "zh-rTW", "fr-rFR", "fa", "it", "pl", "hi", "de", "sk", "es", "ar", "ja", "gl", "ca") vectorDrawables.useSupportLibrary = true @@ -78,10 +78,11 @@ dependencies { implementation(project(":data")) - implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.3") - implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.4.3") + implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.0") + implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.0") - implementation("androidx.core:core-ktx:1.5.0-rc01") + implementation("androidx.core:core-ktx:1.5.0-rc02") + implementation("androidx.activity:activity-ktx:1.2.3") implementation("androidx.fragment:fragment-ktx:1.3.3") implementation("androidx.appcompat:appcompat:1.3.0-rc01") implementation("androidx.constraintlayout:constraintlayout:2.0.4") @@ -103,7 +104,7 @@ dependencies { implementation("io.insert-koin:koin-android:3.0.1") implementation("com.github.iamironz:binaryprefs:1.0.1") - implementation("com.elvishew:xlog:1.8.0") + implementation("com.elvishew:xlog:1.9.0") firebaseImplementation("com.google.android.play:core:1.10.0") firebaseImplementation("com.google.android.play:core-ktx:1.8.1") { @@ -112,8 +113,8 @@ dependencies { exclude group: "androidx.fragment" exclude group: "androidx.core" } - firebaseReleaseImplementation("com.google.firebase:firebase-analytics:18.0.3") - firebaseReleaseImplementation("com.google.firebase:firebase-crashlytics:17.4.1") + firebaseReleaseImplementation("com.google.firebase:firebase-analytics:19.0.0") + firebaseReleaseImplementation("com.google.firebase:firebase-crashlytics:18.0.0") debugImplementation("com.squareup.leakcanary:leakcanary-android:2.7") } diff --git a/build.gradle b/build.gradle index 9d9a95c7..1a6fcf62 100644 --- a/build.gradle +++ b/build.gradle @@ -1,20 +1,21 @@ buildscript { repositories { google() - jcenter() + mavenCentral() } dependencies { - classpath("com.android.tools.build:gradle:4.1.3") - classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.32") - classpath("com.google.gms:google-services:4.3.5") - classpath("com.google.firebase:firebase-crashlytics-gradle:2.5.2") + classpath("com.android.tools.build:gradle:4.2.1") + classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.0") + classpath("com.google.gms:google-services:4.3.8") + classpath("com.google.firebase:firebase-crashlytics-gradle:2.6.1") } } allprojects { repositories { google() + mavenCentral() jcenter() maven { url = uri("https://jitpack.io") } } diff --git a/data/build.gradle b/data/build.gradle index 83f2bad8..de4e551e 100644 --- a/data/build.gradle +++ b/data/build.gradle @@ -8,8 +8,8 @@ android { defaultConfig { minSdkVersion(21) targetSdkVersion(30) - versionCode = 30602 - versionName = "3.6.2" + versionCode = 30603 + versionName = "3.6.3" } compileOptions { @@ -27,12 +27,13 @@ android { } dependencies { - implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.3") + implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.0") + implementation("org.jetbrains.kotlin:kotlin-reflect:1.5.0") - implementation("androidx.core:core:1.5.0-rc01") + implementation("androidx.core:core:1.5.0-rc02") - implementation("io.ktor:ktor-server-cio:1.5.3") + implementation("io.ktor:ktor-server-cio:1.5.4") implementation("com.github.iamironz:binaryprefs:1.0.1") - implementation("com.elvishew:xlog:1.8.0") + implementation("com.elvishew:xlog:1.9.0") } \ No newline at end of file diff --git a/data/src/main/kotlin/info/dvkr/screenstream/data/httpserver/HttpServer.kt b/data/src/main/kotlin/info/dvkr/screenstream/data/httpserver/HttpServer.kt index 26dbe710..683efd0f 100644 --- a/data/src/main/kotlin/info/dvkr/screenstream/data/httpserver/HttpServer.kt +++ b/data/src/main/kotlin/info/dvkr/screenstream/data/httpserver/HttpServer.kt @@ -53,9 +53,11 @@ internal class HttpServer( private val httpServerFiles: HttpServerFiles = HttpServerFiles(applicationContext, settingsReadOnly) private val clientData: ClientData = ClientData(settingsReadOnly) { sendEvent(it) } private val stopDeferred: AtomicReference?> = AtomicReference(null) - private val blockedJPEG: ByteArray = ByteArrayOutputStream().apply { - addressBlockedBitmap.compress(Bitmap.CompressFormat.JPEG, 100, this) - }.toByteArray() + private val blockedJPEG: ByteArray by lazy { + ByteArrayOutputStream().apply { + addressBlockedBitmap.compress(Bitmap.CompressFormat.JPEG, 100, this) + }.toByteArray() + } private var ktorServer: CIOApplicationEngine? = null @@ -67,9 +69,7 @@ internal class HttpServer( XLog.d(getLog("startServer")) val coroutineExceptionHandler = CoroutineExceptionHandler { _, throwable -> - if (throwable is IOException) return@CoroutineExceptionHandler - XLog.e(getLog("onCoroutineException >>>")) - XLog.e(getLog("onCoroutineException"), throwable) + XLog.e(getLog("onCoroutineException", throwable.toString())) sendEvent(Event.Error(FatalError.HttpServerException)) ktorServer?.stop(250, 250) ktorServer = null diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index f3d88b1c..f6b961fd 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 8db0d0d9..19869d66 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.5.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-bin.zip