Skip to content

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
Update fix for “unknown format” problem
  • Loading branch information
dkrivoruchko committed Oct 25, 2020
1 parent 707a3b1 commit addab23
Show file tree
Hide file tree
Showing 18 changed files with 133 additions and 120 deletions.
48 changes: 25 additions & 23 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ android {
applicationId = "info.dvkr.screenstream"
minSdkVersion(21)
targetSdkVersion(30)
versionCode = 30415
versionName = "3.4.15"
resConfigs("en", "ru", "pt-rBR", "zh-rTW", "fr-rFR", "fa", "it", "pl", "hi", "de", "sk", "es", "ar", "ja", "gl","cat")
versionCode = 30500
versionName = "3.5.0"
resConfigs("en", "ru", "pt-rBR", "zh-rTW", "fr-rFR", "fa", "it", "pl", "hi", "de", "sk", "es", "ar", "ja", "gl", "cat")

vectorDrawables.useSupportLibrary = true
}
Expand All @@ -29,6 +29,10 @@ android {
minifyEnabled = true
shrinkResources = true
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")

packagingOptions {
exclude("DebugProbesKt.bin")
}
}
}

Expand All @@ -48,15 +52,15 @@ android {
}

sourceSets {
main.java.srcDirs += 'src/main/kotlin'
main.java.srcDirs += "src/main/kotlin"

firebase.java.srcDirs += 'src/firebase/kotlin'
firebaseDebug.java.srcDirs += 'src/firebaseDebug/kotlin'
firebaseRelease.java.srcDirs += 'src/firebaseRelease/kotlin'
firebase.java.srcDirs += "src/firebase/kotlin"
firebaseDebug.java.srcDirs += "src/firebaseDebug/kotlin"
firebaseRelease.java.srcDirs += "src/firebaseRelease/kotlin"

firebasefree.java.srcDirs += 'src/firebasefree/kotlin'
firebasefreeDebug.java.srcDirs += 'src/firebasefreeDebug/kotlin'
firebasefreeRelease.java.srcDirs += 'src/firebasefreeRelease/kotlin'
firebasefree.java.srcDirs += "src/firebasefree/kotlin"
firebasefreeDebug.java.srcDirs += "src/firebasefreeDebug/kotlin"
firebasefreeRelease.java.srcDirs += "src/firebasefreeRelease/kotlin"
}

packagingOptions {
Expand All @@ -67,24 +71,22 @@ android {
kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8.toString()
freeCompilerArgs += ["-Xopt-in=kotlinx.coroutines.ExperimentalCoroutinesApi"]
// freeCompilerArgs += ["-Xopt-in=kotlinx.coroutines.ObsoleteCoroutinesApi"]
// freeCompilerArgs += ["-Xopt-in=kotlinx.coroutines.FlowPreview"]
}
}

dependencies {
implementation(project(":data"))

implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.9")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.9")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.0-M1")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.4.0-M1")

implementation("com.google.android.material:material:1.2.1")
implementation("androidx.appcompat:appcompat:1.2.0")
implementation('androidx.fragment:fragment-ktx:1.2.5')
implementation("androidx.fragment:fragment-ktx:1.2.5")
implementation("androidx.recyclerview:recyclerview:1.1.0")
implementation("androidx.constraintlayout:constraintlayout:2.0.1")
implementation("androidx.navigation:navigation-fragment-ktx:2.3.0")
implementation("androidx.navigation:navigation-ui-ktx:2.3.0")
implementation("androidx.constraintlayout:constraintlayout:2.0.2")
implementation("androidx.navigation:navigation-fragment-ktx:2.3.1")
implementation("androidx.navigation:navigation-ui-ktx:2.3.1")
implementation("androidx.viewpager2:viewpager2:1.0.0")
implementation("androidx.lifecycle:lifecycle-livedata:2.2.0")
implementation("androidx.lifecycle:lifecycle-common-java8:2.2.0")
Expand All @@ -101,14 +103,14 @@ dependencies {
implementation("com.github.iamironz:binaryprefs:1.0.1")
implementation("com.elvishew:xlog:1.6.1")

firebaseImplementation('com.google.android.play:core:1.8.0')
firebaseImplementation("com.google.android.play:core:1.8.2")
firebaseImplementation("com.google.android.play:core-ktx:1.8.1") {
exclude group: 'org.jetbrains.kotlin', module: 'kotlin-stdlib-jdk7'
exclude group: "org.jetbrains.kotlin", module: "kotlin-stdlib-jdk7"
}
firebaseReleaseImplementation('com.google.firebase:firebase-analytics:17.5.0')
firebaseReleaseImplementation('com.google.firebase:firebase-crashlytics:17.2.1')
firebaseReleaseImplementation("com.google.firebase:firebase-analytics:17.6.0")
firebaseReleaseImplementation("com.google.firebase:firebase-crashlytics:17.2.2")

debugImplementation("com.squareup.leakcanary:leakcanary-android:2.4")
debugImplementation("com.squareup.leakcanary:leakcanary-android:2.5")
}

android.applicationVariants.all {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,18 @@ class AppActivity : PermissionActivity(R.layout.activity_app) {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)

routeIntentAction(intent)
}

override fun onPostCreate(savedInstanceState: Bundle?) {
super.onPostCreate(savedInstanceState)

with(findNavController(R.id.fr_activity_app_nav_host_fragment)) {
binding.bottomNavigationActivityApp.setupWithNavController(this)
addOnDestinationChangedListener { _, destination, _ ->
if (destination.id == R.id.nav_exitFragment) IntentAction.Exit.sendToAppService(this@AppActivity)
}
}

routeIntentAction(intent)
}

override fun onNewIntent(intent: Intent?) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import androidx.annotation.LayoutRes
import androidx.appcompat.app.AppCompatDelegate
import androidx.lifecycle.LiveData
import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.Observer
import androidx.lifecycle.coroutineScope
import com.elvishew.xlog.XLog
import info.dvkr.screenstream.data.other.getLog
Expand Down Expand Up @@ -69,7 +68,7 @@ abstract class ServiceActivity(@LayoutRes contentLayoutId: Int) : AppUpdateActiv

override fun onStart() {
super.onStart()
serviceMessageLiveData.observe(this, Observer { message -> message?.let { onServiceMessage(it) } })
serviceMessageLiveData.observe(this, { message -> message?.let { onServiceMessage(it) } })
bindService(AppService.getAppServiceIntent(this), serviceConnection, Context.BIND_AUTO_CREATE)

settings.registerChangeListener(settingsListener)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import androidx.appcompat.widget.AppCompatImageView
import androidx.core.content.ContextCompat
import androidx.fragment.app.Fragment
import androidx.lifecycle.Lifecycle
import androidx.lifecycle.Observer
import androidx.recyclerview.widget.DefaultItemAnimator
import androidx.recyclerview.widget.DiffUtil
import androidx.recyclerview.widget.ListAdapter
Expand Down Expand Up @@ -75,7 +74,7 @@ class StreamFragment : Fragment(R.layout.fragment_stream) {
XLog.d(getLog("onStart", "Invoked"))

(requireActivity() as ServiceActivity).getServiceMessageLiveData()
.observe(this, Observer<ServiceMessage> { serviceMessage ->
.observe(this, { serviceMessage ->
when (serviceMessage) {
is ServiceMessage.ServiceState -> onServiceStateMessage(serviceMessage)
is ServiceMessage.Clients -> onClientsMessage(serviceMessage)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,9 @@ class ExpansionHeader @JvmOverloads constructor(
indicatorAnimator?.cancel()

indicatorAnimator = if (willExpand) {
ObjectAnimator.ofFloat<View>(it, View.ROTATION, headerRotationExpanded.toFloat())
ObjectAnimator.ofFloat(it, View.ROTATION, headerRotationExpanded.toFloat())
} else {
ObjectAnimator.ofFloat<View>(it, View.ROTATION, headerRotationCollapsed.toFloat())
ObjectAnimator.ofFloat(it, View.ROTATION, headerRotationCollapsed.toFloat())
}

indicatorAnimator?.addListener(object : AnimatorListenerAdapter() {
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/activity_app.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
android:background="@drawable/view_shadow_bottom"
app:layout_constraintTop_toBottomOf="@id/ll_activity_app_logs" />

<fragment
<androidx.fragment.app.FragmentContainerView
android:id="@+id/fr_activity_app_nav_host_fragment"
android:name="androidx.navigation.fragment.NavHostFragment"
android:layout_width="match_parent"
Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ buildscript {
}

dependencies {
classpath('com.android.tools.build:gradle:4.0.1')
classpath("com.android.tools.build:gradle:4.1.0")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.10")
classpath("com.google.gms:google-services:4.3.3")
classpath("com.google.gms:google-services:4.3.4")
classpath("com.google.firebase:firebase-crashlytics-gradle:2.3.0")
}
}
Expand Down
12 changes: 5 additions & 7 deletions data/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ android {
defaultConfig {
minSdkVersion(21)
targetSdkVersion(30)
versionCode = 30415
versionName = "3.4.15"
versionCode = 30500
versionName = "3.5.0"
}

compileOptions {
Expand All @@ -18,22 +18,20 @@ android {
}

sourceSets {
main.java.srcDirs += 'src/main/kotlin'
main.java.srcDirs += "src/main/kotlin"
}

kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8.toString()
freeCompilerArgs += ["-Xopt-in=kotlinx.coroutines.ExperimentalCoroutinesApi"]
// freeCompilerArgs += ["-Xopt-in=kotlinx.coroutines.ObsoleteCoroutinesApi"]
// freeCompilerArgs += ["-Xopt-in=kotlinx.coroutines.FlowPreview"]
}
}

dependencies {
implementation("org.jetbrains.kotlin:kotlin-android-extensions-runtime:1.4.10")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.9")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.0-M1")

implementation("androidx.core:core:1.3.1")
implementation("androidx.core:core-ktx:1.3.2")
implementation("androidx.arch.core:core-common:2.1.0")
implementation("androidx.collection:collection:1.1.0")
implementation("androidx.lifecycle:lifecycle-common-java8:2.2.0")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class AppHttpServer(

private enum class State { CREATED, RUNNING, ERROR }

private val state = AtomicReference<State>(State.CREATED)
private val state = AtomicReference(State.CREATED)
private var serverEventLoop: EventLoopGroup? = null
private var nettyHttpServer: HttpServer<ByteBuf, ByteBuf>? = null
private var httpServerRxHandler: HttpServerRxHandler? = null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,9 @@ class ClientStatistic(
var sendBytes: Long = 0,
var disconnectedTime: Long = 0
) {
internal fun isDisconnectHoldTimePass(now: Long) =
(now - disconnectedTime) > CLIENT_DISCONNECT_HOLD_TIME_SECONDS * 1000
fun isDisconnectHoldTimePass(now: Long) = (now - disconnectedTime) > CLIENT_DISCONNECT_HOLD_TIME_SECONDS * 1000

internal fun toHttpClient() = HttpClient(id, clientAddressAndPort, isSlowConnection, isDisconnected)
fun toHttpClient() = HttpClient(id, clientAddressAndPort, isSlowConnection, isDisconnected)
}

private val statisticEventChannel = statisticScope.actor<StatisticEvent>(capacity = 64) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import kotlinx.coroutines.ensureActive
import kotlinx.coroutines.launch
import rx.BackpressureOverflow
import rx.Observable
import rx.functions.Action0
import java.io.ByteArrayOutputStream
import java.net.InetAddress
import java.net.InetSocketAddress
Expand Down Expand Up @@ -154,7 +153,7 @@ internal class HttpServerRxHandler(
.observeOn(eventloopScheduler)
.onBackpressureBuffer(
2,
Action0 {
{
clientStatistic.sendEvent(
ClientStatistic.StatisticEvent.Backpressure(clientAddress.hashCode().toLong())
)
Expand Down Expand Up @@ -187,6 +186,6 @@ internal class HttpServerRxHandler(
addHeader(HttpHeaderNames.CONTENT_TYPE, "text/plain; charset=UTF-8")
setHeader(HttpHeaderNames.CACHE_CONTROL, "no-cache,no-store,max-age=0,must-revalidate")
setHeader(HttpHeaderNames.CONNECTION, HttpHeaderValues.CLOSE)
return Observable.empty<Void>()
return Observable.empty()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ internal class HttpServerThreadFactory private constructor(

private fun newThread(r: Runnable, name: String): Thread = FastThreadLocalThread(threadGroup, r, name)

private class DefaultRunnableDecorator internal constructor(private val r: Runnable) : Runnable {
private class DefaultRunnableDecorator constructor(private val r: Runnable) : Runnable {
override fun run() {
try {
r.run()
Expand Down
Loading

0 comments on commit addab23

Please sign in to comment.