Merge pull request #10530 from TacoTheDank/bumpMiscLibraries

Update miscellaneous libraries
This commit is contained in:
Stypox 2023-12-23 12:06:42 +01:00 committed by GitHub
commit 2b4357fa87
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 34 additions and 37 deletions

View File

@ -98,7 +98,9 @@ android {
resources { resources {
// remove two files which belong to jsoup // remove two files which belong to jsoup
// no idea how they ended up in the META-INF dir... // no idea how they ended up in the META-INF dir...
excludes += ['META-INF/README.md', 'META-INF/CHANGES'] excludes += ['META-INF/README.md', 'META-INF/CHANGES',
// 'COPYRIGHT' belongs to RxJava...
'META-INF/COPYRIGHT']
} }
} }
} }
@ -107,7 +109,7 @@ ext {
checkstyleVersion = '10.12.1' checkstyleVersion = '10.12.1'
androidxLifecycleVersion = '2.6.2' androidxLifecycleVersion = '2.6.2'
androidxRoomVersion = '2.5.2' androidxRoomVersion = '2.6.1'
androidxWorkVersion = '2.8.1' androidxWorkVersion = '2.8.1'
icepickVersion = '3.2.0' icepickVersion = '3.2.0'
@ -118,7 +120,6 @@ ext {
leakCanaryVersion = '2.12' leakCanaryVersion = '2.12'
stethoVersion = '1.6.0' stethoVersion = '1.6.0'
mockitoVersion = '4.0.0'
} }
configurations { configurations {
@ -133,7 +134,7 @@ checkstyle {
toolVersion = checkstyleVersion toolVersion = checkstyleVersion
} }
task runCheckstyle(type: Checkstyle) { tasks.register('runCheckstyle', Checkstyle) {
source 'src' source 'src'
include '**/*.java' include '**/*.java'
exclude '**/gen/**' exclude '**/gen/**'
@ -154,7 +155,7 @@ task runCheckstyle(type: Checkstyle) {
def outputDir = "${project.buildDir}/reports/ktlint/" def outputDir = "${project.buildDir}/reports/ktlint/"
def inputFiles = project.fileTree(dir: "src", include: "**/*.kt") def inputFiles = project.fileTree(dir: "src", include: "**/*.kt")
task runKtlint(type: JavaExec) { tasks.register('runKtlint', JavaExec) {
inputs.files(inputFiles) inputs.files(inputFiles)
outputs.dir(outputDir) outputs.dir(outputDir)
getMainClass().set("com.pinterest.ktlint.Main") getMainClass().set("com.pinterest.ktlint.Main")
@ -163,7 +164,7 @@ task runKtlint(type: JavaExec) {
jvmArgs("--add-opens", "java.base/java.lang=ALL-UNNAMED") jvmArgs("--add-opens", "java.base/java.lang=ALL-UNNAMED")
} }
task formatKtlint(type: JavaExec) { tasks.register('formatKtlint', JavaExec) {
inputs.files(inputFiles) inputs.files(inputFiles)
outputs.dir(outputDir) outputs.dir(outputDir)
getMainClass().set("com.pinterest.ktlint.Main") getMainClass().set("com.pinterest.ktlint.Main")
@ -189,7 +190,7 @@ sonar {
dependencies { dependencies {
/** Desugaring **/ /** Desugaring **/
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs_nio:2.0.3' coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs_nio:2.0.4'
/** NewPipe libraries **/ /** NewPipe libraries **/
// You can use a local version by uncommenting a few lines in settings.gradle // You can use a local version by uncommenting a few lines in settings.gradle
@ -213,11 +214,11 @@ dependencies {
implementation 'androidx.constraintlayout:constraintlayout:2.1.4' implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'androidx.core:core-ktx:1.12.0' implementation 'androidx.core:core-ktx:1.12.0'
implementation 'androidx.documentfile:documentfile:1.0.1' implementation 'androidx.documentfile:documentfile:1.0.1'
implementation 'androidx.fragment:fragment-ktx:1.6.1' implementation 'androidx.fragment:fragment-ktx:1.6.2'
implementation "androidx.lifecycle:lifecycle-livedata-ktx:${androidxLifecycleVersion}" implementation "androidx.lifecycle:lifecycle-livedata-ktx:${androidxLifecycleVersion}"
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:${androidxLifecycleVersion}" implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:${androidxLifecycleVersion}"
implementation 'androidx.localbroadcastmanager:localbroadcastmanager:1.1.0' implementation 'androidx.localbroadcastmanager:localbroadcastmanager:1.1.0'
implementation 'androidx.media:media:1.6.0' implementation 'androidx.media:media:1.7.0'
implementation 'androidx.preference:preference:1.2.1' implementation 'androidx.preference:preference:1.2.1'
implementation 'androidx.recyclerview:recyclerview:1.3.2' implementation 'androidx.recyclerview:recyclerview:1.3.2'
implementation "androidx.room:room-runtime:${androidxRoomVersion}" implementation "androidx.room:room-runtime:${androidxRoomVersion}"
@ -229,7 +230,7 @@ dependencies {
implementation 'androidx.viewpager2:viewpager2:1.1.0-beta02' implementation 'androidx.viewpager2:viewpager2:1.1.0-beta02'
implementation "androidx.work:work-runtime-ktx:${androidxWorkVersion}" implementation "androidx.work:work-runtime-ktx:${androidxWorkVersion}"
implementation "androidx.work:work-rxjava3:${androidxWorkVersion}" implementation "androidx.work:work-rxjava3:${androidxWorkVersion}"
implementation 'com.google.android.material:material:1.9.0' implementation 'com.google.android.material:material:1.11.0'
/** Third-party libraries **/ /** Third-party libraries **/
// Instance state boilerplate elimination // Instance state boilerplate elimination
@ -237,13 +238,10 @@ dependencies {
kapt "frankiesardo:icepick-processor:${icepickVersion}" kapt "frankiesardo:icepick-processor:${icepickVersion}"
// HTML parser // HTML parser
implementation "org.jsoup:jsoup:1.16.1" implementation "org.jsoup:jsoup:1.16.2"
// HTTP client // HTTP client
implementation "com.squareup.okhttp3:okhttp:4.11.0" implementation "com.squareup.okhttp3:okhttp:4.12.0"
// okhttp3:4.11.0 introduces a vulnerability from com.squareup.okio:okio@3.3.0,
// remove com.squareup.okio:okio when updating okhttp
implementation "com.squareup.okio:okio:3.4.0"
// Media player // Media player
implementation "com.google.android.exoplayer:exoplayer-core:${exoPlayerVersion}" implementation "com.google.android.exoplayer:exoplayer-core:${exoPlayerVersion}"
@ -272,19 +270,19 @@ dependencies {
implementation "io.noties.markwon:linkify:${markwonVersion}" implementation "io.noties.markwon:linkify:${markwonVersion}"
// Crash reporting // Crash reporting
implementation "ch.acra:acra-core:5.10.1" implementation "ch.acra:acra-core:5.11.3"
// Properly restarting // Properly restarting
implementation 'com.jakewharton:process-phoenix:2.1.2' implementation 'com.jakewharton:process-phoenix:2.1.2'
// Reactive extensions for Java VM // Reactive extensions for Java VM
implementation "io.reactivex.rxjava3:rxjava:3.1.6" implementation "io.reactivex.rxjava3:rxjava:3.1.8"
implementation "io.reactivex.rxjava3:rxandroid:3.0.2" implementation "io.reactivex.rxjava3:rxandroid:3.0.2"
// RxJava binding APIs for Android UI widgets // RxJava binding APIs for Android UI widgets
implementation "com.jakewharton.rxbinding4:rxbinding:4.0.0" implementation "com.jakewharton.rxbinding4:rxbinding:4.0.0"
// Date and time formatting // Date and time formatting
implementation "org.ocpsoft.prettytime:prettytime:5.0.6.Final" implementation "org.ocpsoft.prettytime:prettytime:5.0.7.Final"
/** Debugging **/ /** Debugging **/
// Memory leak detection // Memory leak detection
@ -297,13 +295,12 @@ dependencies {
/** Testing **/ /** Testing **/
testImplementation 'junit:junit:4.13.2' testImplementation 'junit:junit:4.13.2'
testImplementation "org.mockito:mockito-core:${mockitoVersion}" testImplementation 'org.mockito:mockito-core:5.6.0'
testImplementation "org.mockito:mockito-inline:${mockitoVersion}"
androidTestImplementation "androidx.test.ext:junit:1.1.5" androidTestImplementation "androidx.test.ext:junit:1.1.5"
androidTestImplementation "androidx.test:runner:1.5.2" androidTestImplementation "androidx.test:runner:1.5.2"
androidTestImplementation "androidx.room:room-testing:${androidxRoomVersion}" androidTestImplementation "androidx.room:room-testing:${androidxRoomVersion}"
androidTestImplementation "org.assertj:assertj-core:3.23.1" androidTestImplementation "org.assertj:assertj-core:3.24.2"
} }
static String getGitWorkingBranch() { static String getGitWorkingBranch() {

View File

@ -7,7 +7,7 @@ import java.time.Instant
import java.time.OffsetDateTime import java.time.OffsetDateTime
import java.time.ZoneOffset import java.time.ZoneOffset
object Converters { class Converters {
/** /**
* Convert a long value to a [OffsetDateTime]. * Convert a long value to a [OffsetDateTime].
* *
@ -47,6 +47,6 @@ object Converters {
@TypeConverter @TypeConverter
fun feedGroupIconOf(id: Int): FeedGroupIcon { fun feedGroupIconOf(id: Int): FeedGroupIcon {
return FeedGroupIcon.values().first { it.id == id } return FeedGroupIcon.entries.first { it.id == id }
} }
} }

View File

@ -26,7 +26,7 @@ object FeedEventManager {
} }
sealed class Event { sealed class Event {
object IdleEvent : Event() data object IdleEvent : Event()
data class ProgressEvent(val currentProgress: Int = -1, val maxProgress: Int = -1, @StringRes val progressMessage: Int = 0) : Event() { data class ProgressEvent(val currentProgress: Int = -1, val maxProgress: Int = -1, @StringRes val progressMessage: Int = 0) : Event() {
constructor(@StringRes progressMessage: Int) : this(-1, -1, progressMessage) constructor(@StringRes progressMessage: Int) : this(-1, -1, progressMessage)
} }

View File

@ -55,10 +55,10 @@ class FeedGroupDialog : DialogFragment(), BackPressable {
private var groupSortOrder: Long = -1 private var groupSortOrder: Long = -1
sealed class ScreenState : Serializable { sealed class ScreenState : Serializable {
object InitialScreen : ScreenState() data object InitialScreen : ScreenState()
object IconPickerScreen : ScreenState() data object IconPickerScreen : ScreenState()
object SubscriptionsPickerScreen : ScreenState() data object SubscriptionsPickerScreen : ScreenState()
object DeleteScreen : ScreenState() data object DeleteScreen : ScreenState()
} }
@State @JvmField var selectedIcon: FeedGroupIcon? = null @State @JvmField var selectedIcon: FeedGroupIcon? = null
@ -370,7 +370,7 @@ class FeedGroupDialog : DialogFragment(), BackPressable {
private fun setupIconPicker() { private fun setupIconPicker() {
val groupAdapter = GroupieAdapter() val groupAdapter = GroupieAdapter()
groupAdapter.addAll(FeedGroupIcon.values().map { PickerIconItem(it) }) groupAdapter.addAll(FeedGroupIcon.entries.map { PickerIconItem(it) })
feedGroupCreateBinding.iconSelector.apply { feedGroupCreateBinding.iconSelector.apply {
layoutManager = GridLayoutManager(requireContext(), 7, RecyclerView.VERTICAL, false) layoutManager = GridLayoutManager(requireContext(), 7, RecyclerView.VERTICAL, false)

View File

@ -110,8 +110,8 @@ class FeedGroupDialogViewModel(
} }
sealed class DialogEvent { sealed class DialogEvent {
object ProcessingEvent : DialogEvent() data object ProcessingEvent : DialogEvent()
object SuccessEvent : DialogEvent() data object SuccessEvent : DialogEvent()
} }
data class Filter(val query: String, val showOnlyUngrouped: Boolean) data class Filter(val query: String, val showOnlyUngrouped: Boolean)

View File

@ -9,7 +9,7 @@ class FeedGroupIconTest {
fun `No gaps and repeated ids`() { fun `No gaps and repeated ids`() {
val usedIds = HashSet<Int>() val usedIds = HashSet<Int>()
for ((shouldBeId, currentIcon) in FeedGroupIcon.values().withIndex()) { for ((shouldBeId, currentIcon) in FeedGroupIcon.entries.withIndex()) {
val added = usedIds.add(currentIcon.id) val added = usedIds.add(currentIcon.id)
assertTrue("Repeated ids (current item: ${currentIcon.name} - ${currentIcon.id})", added) assertTrue("Repeated ids (current item: ${currentIcon.name} - ${currentIcon.id})", added)
@ -24,7 +24,7 @@ class FeedGroupIconTest {
fun `No icons pointing to the same attr`() { fun `No icons pointing to the same attr`() {
val usedIcons = HashSet<Int>() val usedIcons = HashSet<Int>()
for (groupIcon in FeedGroupIcon.values()) { for (groupIcon in FeedGroupIcon.entries) {
val added = usedIcons.add(groupIcon.drawableResource) val added = usedIcons.add(groupIcon.drawableResource)
assertTrue("Repeated icon (current item: ${groupIcon.name} - ${groupIcon.id})", added) assertTrue("Repeated icon (current item: ${groupIcon.name} - ${groupIcon.id})", added)
} }

View File

@ -1,13 +1,13 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules. // Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript { buildscript {
ext.kotlin_version = '1.8.22' ext.kotlin_version = '1.9.10'
repositories { repositories {
google() google()
mavenCentral() mavenCentral()
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:8.1.1' classpath 'com.android.tools.build:gradle:8.2.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// NOTE: Do not place your application dependencies here; they belong // NOTE: Do not place your application dependencies here; they belong

View File

@ -1,7 +1,7 @@
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
distributionSha256Sum=e111cb9948407e26351227dabce49822fb88c37ee72f1d1582a69c68af2e702f distributionSha256Sum=38f66cd6eef217b4c35855bb11ea4e9fbc53594ccccb5fb82dfd317ef8c2c5a3
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
networkTimeout=10000 networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists