Skip to content

Commit

Permalink
chore: update dependencies to latest
Browse files Browse the repository at this point in the history
  • Loading branch information
shadow578 committed Oct 1, 2022
1 parent 165dadf commit 5471ae4
Show file tree
Hide file tree
Showing 8 changed files with 40 additions and 41 deletions.
55 changes: 27 additions & 28 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,15 @@ if (useSignProps)
FileInputStream(signPropsFile).use { signProps.load(it) }

android {
compileSdk = 30
buildToolsVersion = "30.0.3"
compileSdk = 33
buildToolsVersion = "33.0.0"
namespace = "io.github.shadow578.yodel"

defaultConfig {
applicationId = "io.github.shadow578.yodel"
minSdk = 23
targetSdk = 30
compileSdk = 30
targetSdk = 33
compileSdk = 33
versionCode = 2
versionName = "1.2"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
Expand Down Expand Up @@ -59,11 +60,8 @@ android {
}
compileOptions {
isCoreLibraryDesugaringEnabled = true

//TODO reverted back to JDK 8 until the next version of AS is released in stable
// https://issuetracker.google.com/issues/180946610?pli=1
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_11.toString()
Expand Down Expand Up @@ -93,56 +91,57 @@ aboutLibraries {

dependencies {
// androidX
implementation("androidx.core:core-ktx:1.6.0")
implementation("androidx.constraintlayout:constraintlayout:2.1.0")
implementation("androidx.appcompat:appcompat:1.3.1")
implementation("androidx.lifecycle:lifecycle-service:2.3.1")
implementation("androidx.core:core-ktx:1.9.0")
implementation("androidx.constraintlayout:constraintlayout:2.1.4")
implementation("androidx.appcompat:appcompat:1.5.1")
implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:2.5.1")
implementation("androidx.lifecycle:lifecycle-service:2.5.1")
implementation("androidx.legacy:legacy-support-v4:1.0.0")
implementation("androidx.preference:preference-ktx:1.1.1")
implementation("androidx.preference:preference-ktx:1.2.0")

// material design
implementation("com.google.android.material:material:1.4.0")
implementation("com.google.android.material:material:1.6.1")

// Room
implementation("androidx.room:room-runtime:2.3.0")
kapt("androidx.room:room-compiler:2.3.0")
implementation("androidx.room:room-runtime:2.4.3")
kapt("androidx.room:room-compiler:2.4.3")

// youtube-dl
implementation("com.github.yausername.youtubedl-android:library:0.14.0")
implementation("com.github.yausername.youtubedl-android:ffmpeg:0.14.0")
implementation("com.github.yausername.youtubedl-android:aria2c:0.14.0")


// id3v2 tagging
implementation("com.mpatric:mp3agic:0.9.1")

// gson
implementation("com.google.code.gson:gson:2.8.7")
implementation("com.google.code.gson:gson:2.9.1")

// glide
implementation("com.github.bumptech.glide:glide:4.12.0")
kapt("com.github.bumptech.glide:compiler:4.12.0")
implementation("com.github.bumptech.glide:glide:4.14.1")
kapt("com.github.bumptech.glide:compiler:4.14.1")

// timber
implementation("com.jakewharton.timber:timber:5.0.1")

// about libraries
implementation("com.mikepenz:aboutlibraries-core:8.9.1")
implementation("com.mikepenz:aboutlibraries:8.9.1")
implementation("com.mikepenz:aboutlibraries-core:8.9.4")
implementation("com.mikepenz:aboutlibraries:8.9.4")

// desugaring
coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:1.1.5")
//TODO 2.0.0 is only available with AGP > 7.4.0
coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:1.2.0")

// unit testing
testImplementation("androidx.test.ext:junit:1.1.3")
testImplementation("org.robolectric:robolectric:4.6.1")
testImplementation("io.kotest:kotest-assertions-core:4.6.1")
testImplementation("org.robolectric:robolectric:4.8.2")
testImplementation("io.kotest:kotest-assertions-core:5.4.2")
androidTestImplementation("androidx.test:runner:1.4.0")
androidTestImplementation("androidx.test:rules:1.4.0")
androidTestImplementation("io.kotest:kotest-assertions-core:4.6.1")
androidTestImplementation("io.kotest:kotest-assertions-core:5.4.2")

// leakcanary (only on debug builds)
debugImplementation("com.squareup.leakcanary:leakcanary-android:2.7")
debugImplementation("com.squareup.leakcanary:leakcanary-android:2.9.1")
}

tasks.withType<Test>().all {
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="io.github.shadow578.yodel">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />

<application
android:name=".YodelApp"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import android.app.*
import android.content.*
import android.graphics.*
import android.os.Build
import android.util.Log
import androidx.annotation.StringRes
import androidx.core.app.*
import androidx.documentfile.provider.DocumentFile
Expand Down Expand Up @@ -642,7 +641,11 @@ class DownloaderService : LifecycleService() {
*/
private fun hideNotification() {
notificationManager.cancel(PROGRESS_NOTIFICATION_ID)
stopForeground(true)
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
stopForeground(STOP_FOREGROUND_REMOVE)
} else {
stopForeground(true)
}
isInForeground = false
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ open class BaseActivity : AppCompatActivity() {
/**
* result launcher for download directory select
*/
private lateinit var downloadDirectorySelectLauncher: ActivityResultLauncher<Uri>
private lateinit var downloadDirectorySelectLauncher: ActivityResultLauncher<Uri?>

override fun attachBaseContext(newBase: Context) {
super.attachBaseContext(newBase.wrapLocale())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import io.github.shadow578.yodel.databinding.FragmentMoreBinding
import io.github.shadow578.yodel.downloader.TrackDownloadFormat
import io.github.shadow578.yodel.ui.base.BaseFragment
import io.github.shadow578.yodel.util.toast
import java.util.*
import java.util.stream.Collectors

/**
Expand Down Expand Up @@ -52,7 +51,7 @@ class MoreFragment : BaseFragment() {

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
chooseExportFileLauncher = registerForActivityResult(CreateDocument()) { uri: Uri? ->
chooseExportFileLauncher = registerForActivityResult(CreateDocument("application/json")) { uri: Uri? ->
if (uri == null) {
return@registerForActivityResult
}
Expand Down
6 changes: 3 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ buildscript {
maven { setUrl("https://plugins.gradle.org/m2/") }
}
dependencies {
classpath("com.android.tools.build:gradle:7.0.0")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.21")
classpath("com.mikepenz.aboutlibraries.plugin:aboutlibraries-plugin:8.9.1")
classpath("com.android.tools.build:gradle:7.3.0")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.10")
classpath("com.mikepenz.aboutlibraries.plugin:aboutlibraries-plugin:8.9.4")

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle.kts files
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Sun Jul 18 10:54:22 CEST 2021
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
2 changes: 0 additions & 2 deletions settings.gradle

This file was deleted.

0 comments on commit 5471ae4

Please sign in to comment.