[Android] Update kotlin version
Nicolas Pomepuy
git at videolan.org
Mon Apr 11 09:26:59 UTC 2022
vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Fri Apr 8 08:20:59 2022 +0200| [aa8cc487d1689cc5d44ec3ff6645c2bad4570903] | committer: Duncan McNamara
Update kotlin version
> https://code.videolan.org/videolan/vlc-android/commit/aa8cc487d1689cc5d44ec3ff6645c2bad4570903
---
.../org/videolan/television/ui/browser/MediaBrowserTvFragment.kt | 2 +-
.../videolan/television/ui/browser/MediaScrapingBrowserTvFragment.kt | 2 +-
.../tools/src/main/java/org/videolan/tools/KotlinExtensions.kt | 5 +----
build.gradle | 2 +-
4 files changed, 4 insertions(+), 7 deletions(-)
diff --git a/application/television/src/main/java/org/videolan/television/ui/browser/MediaBrowserTvFragment.kt b/application/television/src/main/java/org/videolan/television/ui/browser/MediaBrowserTvFragment.kt
index 74bb949c2..56eb4db8e 100644
--- a/application/television/src/main/java/org/videolan/television/ui/browser/MediaBrowserTvFragment.kt
+++ b/application/television/src/main/java/org/videolan/television/ui/browser/MediaBrowserTvFragment.kt
@@ -24,7 +24,7 @@ import org.videolan.vlc.gui.view.EmptyLoadingState
import org.videolan.vlc.interfaces.IEventsHandler
import org.videolan.vlc.providers.medialibrary.MedialibraryProvider
- at UseExperimental(ObsoleteCoroutinesApi::class)
+ at OptIn(ObsoleteCoroutinesApi::class)
@ExperimentalCoroutinesApi
class MediaBrowserTvFragment : BaseBrowserTvFragment<MediaLibraryItem>() {
override fun provideAdapter(eventsHandler: IEventsHandler<MediaLibraryItem>, itemSize: Int): TvItemAdapter {
diff --git a/application/television/src/main/java/org/videolan/television/ui/browser/MediaScrapingBrowserTvFragment.kt b/application/television/src/main/java/org/videolan/television/ui/browser/MediaScrapingBrowserTvFragment.kt
index 2ab12c475..4ce0dd76f 100644
--- a/application/television/src/main/java/org/videolan/television/ui/browser/MediaScrapingBrowserTvFragment.kt
+++ b/application/television/src/main/java/org/videolan/television/ui/browser/MediaScrapingBrowserTvFragment.kt
@@ -48,7 +48,7 @@ import org.videolan.vlc.R
import org.videolan.vlc.gui.view.EmptyLoadingState
import org.videolan.vlc.interfaces.IEventsHandler
- at UseExperimental(ObsoleteCoroutinesApi::class)
+ at OptIn(ObsoleteCoroutinesApi::class)
@ExperimentalCoroutinesApi
class MediaScrapingBrowserTvFragment : BaseBrowserTvFragment<MediaMetadataWithImages>() {
override fun provideAdapter(eventsHandler: IEventsHandler<MediaMetadataWithImages>, itemSize: Int): TvItemAdapter {
diff --git a/application/tools/src/main/java/org/videolan/tools/KotlinExtensions.kt b/application/tools/src/main/java/org/videolan/tools/KotlinExtensions.kt
index bd33c59f8..00c3c5dfb 100644
--- a/application/tools/src/main/java/org/videolan/tools/KotlinExtensions.kt
+++ b/application/tools/src/main/java/org/videolan/tools/KotlinExtensions.kt
@@ -1,7 +1,6 @@
package org.videolan.tools
import android.annotation.SuppressLint
-import android.app.Activity
import android.app.ActivityManager
import android.app.ActivityManager.RunningAppProcessInfo
import android.content.ClipData
@@ -23,10 +22,8 @@ import androidx.lifecycle.Lifecycle
import androidx.lifecycle.LifecycleOwner
import androidx.lifecycle.ProcessLifecycleOwner
import androidx.localbroadcastmanager.content.LocalBroadcastManager
-import kotlinx.coroutines.CancellationException
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.channels.Channel
-import kotlinx.coroutines.channels.SendChannel
import kotlinx.coroutines.channels.actor
import kotlinx.coroutines.channels.awaitClose
import kotlinx.coroutines.delay
@@ -107,7 +104,7 @@ suspend fun Context.awaitAppIsForegroung(): Boolean {
private fun ActivityManager.isAppForeground() = runningAppProcesses[0].importance <= RunningAppProcessInfo.IMPORTANCE_FOREGROUND
- at UseExperimental(ExperimentalContracts::class)
+ at OptIn(ExperimentalContracts::class)
fun String?.isValidUrl(): Boolean {
contract {
returns(true) implies (this at isValidUrl != null)
diff --git a/build.gradle b/build.gradle
index 1b319cc94..f298347ab 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,7 +1,7 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.android_plugin_version = '7.1.3'
- ext.kotlin_version = '1.6.10'
+ ext.kotlin_version = '1.6.20'
ext.kotlinx_version = '1.6.0'
repositories {
flatDir dirs: "gradle/plugins"
More information about the Android
mailing list