From fcd382ca8b18fb326968060d7ab89f4a0d9eb57e Mon Sep 17 00:00:00 2001 From: Hardcore Sushi Date: Mon, 7 Jun 2021 13:23:11 +0200 Subject: [PATCH] Update gradle dependencies --- app/build.gradle | 12 ++++++------ .../hardcore/droidfs/file_viewers/MediaPlayer.kt | 5 +++-- app/src/main/res/layout/activity_video_player.xml | 2 +- build.gradle | 8 ++++---- 4 files changed, 14 insertions(+), 13 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 55ed126..01daf6f 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -45,25 +45,25 @@ android { dependencies { implementation fileTree(dir: "libs", include: ["*.jar"]) implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" - implementation "androidx.core:core-ktx:1.3.2" - implementation "androidx.appcompat:appcompat:1.2.0" + implementation "androidx.core:core-ktx:1.5.0" + implementation "androidx.appcompat:appcompat:1.3.0" implementation "androidx.constraintlayout:constraintlayout:2.0.4" implementation "androidx.sqlite:sqlite-ktx:2.1.0" implementation "androidx.preference:preference-ktx:1.1.1" implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0" implementation "com.jaredrummler:cyanea:1.0.2" - implementation "com.github.bumptech.glide:glide:4.11.0" + implementation "com.github.bumptech.glide:glide:4.12.0" implementation "androidx.biometric:biometric:1.1.0" - def exoplayer_version = "2.13.2" + def exoplayer_version = "2.14.0" implementation "com.google.android.exoplayer:exoplayer-core:$exoplayer_version" implementation "com.google.android.exoplayer:exoplayer-ui:$exoplayer_version" - def camerax_v1 = "1.1.0-alpha03" + def camerax_v1 = "1.1.0-alpha05" implementation "androidx.camera:camera-camera2:$camerax_v1" implementation "androidx.camera:camera-lifecycle:$camerax_v1" - def camerax_v2 = "1.0.0-alpha23" + def camerax_v2 = "1.0.0-alpha25" implementation "androidx.camera:camera-view:$camerax_v2" implementation "androidx.camera:camera-extensions:$camerax_v2" } diff --git a/app/src/main/java/sushi/hardcore/droidfs/file_viewers/MediaPlayer.kt b/app/src/main/java/sushi/hardcore/droidfs/file_viewers/MediaPlayer.kt index b680144..fa7b58f 100644 --- a/app/src/main/java/sushi/hardcore/droidfs/file_viewers/MediaPlayer.kt +++ b/app/src/main/java/sushi/hardcore/droidfs/file_viewers/MediaPlayer.kt @@ -5,6 +5,7 @@ import com.google.android.exoplayer2.ExoPlaybackException import com.google.android.exoplayer2.MediaItem import com.google.android.exoplayer2.Player import com.google.android.exoplayer2.SimpleExoPlayer +import com.google.android.exoplayer2.extractor.ExtractorsFactory import com.google.android.exoplayer2.extractor.flac.FlacExtractor import com.google.android.exoplayer2.extractor.mkv.MatroskaExtractor import com.google.android.exoplayer2.extractor.mp3.Mp3Extractor @@ -31,7 +32,7 @@ abstract class MediaPlayer: FileViewerActivity() { private fun createMediaSource(filePath: String): MediaSource { val dataSourceFactory = GocryptfsDataSource.Factory(gocryptfsVolume, filePath) - return ProgressiveMediaSource.Factory(dataSourceFactory, { arrayOf( + return ProgressiveMediaSource.Factory(dataSourceFactory, ExtractorsFactory { arrayOf( MatroskaExtractor(), Mp4Extractor(), Mp3Extractor(), @@ -51,7 +52,7 @@ abstract class MediaPlayer: FileViewerActivity() { player.repeatMode = Player.REPEAT_MODE_ALL player.seekToDefaultPosition(currentPlaylistIndex) player.playWhenReady = true - player.addListener(object : Player.EventListener{ + player.addListener(object : Player.Listener{ override fun onPlayerStateChanged(playWhenReady: Boolean, playbackState: Int) { if (playbackState == Player.STATE_READY) { onPlayerReady() diff --git a/app/src/main/res/layout/activity_video_player.xml b/app/src/main/res/layout/activity_video_player.xml index a9d8b29..cefc138 100644 --- a/app/src/main/res/layout/activity_video_player.xml +++ b/app/src/main/res/layout/activity_video_player.xml @@ -8,7 +8,7 @@ \ No newline at end of file diff --git a/build.gradle b/build.gradle index 06ea8a4..64ea5eb 100644 --- a/build.gradle +++ b/build.gradle @@ -1,12 +1,12 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { - ext.kotlin_version = "1.4.21" + ext.kotlin_version = "1.5.10" repositories { google() - jcenter() + mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:4.1.3' + classpath 'com.android.tools.build:gradle:4.2.1' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } } @@ -14,7 +14,7 @@ buildscript { allprojects { repositories { google() - jcenter() + mavenCentral() } }