Skip to content

Commit 2b4357f

Browse files
authored
Merge pull request #10530 from TacoTheDank/bumpMiscLibraries
Update miscellaneous libraries
2 parents ee3455e + cda4b3f commit 2b4357f

8 files changed

Lines changed: 34 additions & 37 deletions

File tree

app/build.gradle

Lines changed: 18 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,9 @@ android {
9898
resources {
9999
// remove two files which belong to jsoup
100100
// no idea how they ended up in the META-INF dir...
101-
excludes += ['META-INF/README.md', 'META-INF/CHANGES']
101+
excludes += ['META-INF/README.md', 'META-INF/CHANGES',
102+
// 'COPYRIGHT' belongs to RxJava...
103+
'META-INF/COPYRIGHT']
102104
}
103105
}
104106
}
@@ -107,7 +109,7 @@ ext {
107109
checkstyleVersion = '10.12.1'
108110

109111
androidxLifecycleVersion = '2.6.2'
110-
androidxRoomVersion = '2.5.2'
112+
androidxRoomVersion = '2.6.1'
111113
androidxWorkVersion = '2.8.1'
112114

113115
icepickVersion = '3.2.0'
@@ -118,7 +120,6 @@ ext {
118120

119121
leakCanaryVersion = '2.12'
120122
stethoVersion = '1.6.0'
121-
mockitoVersion = '4.0.0'
122123
}
123124

124125
configurations {
@@ -133,7 +134,7 @@ checkstyle {
133134
toolVersion = checkstyleVersion
134135
}
135136

136-
task runCheckstyle(type: Checkstyle) {
137+
tasks.register('runCheckstyle', Checkstyle) {
137138
source 'src'
138139
include '**/*.java'
139140
exclude '**/gen/**'
@@ -154,7 +155,7 @@ task runCheckstyle(type: Checkstyle) {
154155
def outputDir = "${project.buildDir}/reports/ktlint/"
155156
def inputFiles = project.fileTree(dir: "src", include: "**/*.kt")
156157

157-
task runKtlint(type: JavaExec) {
158+
tasks.register('runKtlint', JavaExec) {
158159
inputs.files(inputFiles)
159160
outputs.dir(outputDir)
160161
getMainClass().set("com.pinterest.ktlint.Main")
@@ -163,7 +164,7 @@ task runKtlint(type: JavaExec) {
163164
jvmArgs("--add-opens", "java.base/java.lang=ALL-UNNAMED")
164165
}
165166

166-
task formatKtlint(type: JavaExec) {
167+
tasks.register('formatKtlint', JavaExec) {
167168
inputs.files(inputFiles)
168169
outputs.dir(outputDir)
169170
getMainClass().set("com.pinterest.ktlint.Main")
@@ -189,7 +190,7 @@ sonar {
189190

190191
dependencies {
191192
/** Desugaring **/
192-
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs_nio:2.0.3'
193+
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs_nio:2.0.4'
193194

194195
/** NewPipe libraries **/
195196
// You can use a local version by uncommenting a few lines in settings.gradle
@@ -213,11 +214,11 @@ dependencies {
213214
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
214215
implementation 'androidx.core:core-ktx:1.12.0'
215216
implementation 'androidx.documentfile:documentfile:1.0.1'
216-
implementation 'androidx.fragment:fragment-ktx:1.6.1'
217+
implementation 'androidx.fragment:fragment-ktx:1.6.2'
217218
implementation "androidx.lifecycle:lifecycle-livedata-ktx:${androidxLifecycleVersion}"
218219
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:${androidxLifecycleVersion}"
219220
implementation 'androidx.localbroadcastmanager:localbroadcastmanager:1.1.0'
220-
implementation 'androidx.media:media:1.6.0'
221+
implementation 'androidx.media:media:1.7.0'
221222
implementation 'androidx.preference:preference:1.2.1'
222223
implementation 'androidx.recyclerview:recyclerview:1.3.2'
223224
implementation "androidx.room:room-runtime:${androidxRoomVersion}"
@@ -229,21 +230,18 @@ dependencies {
229230
implementation 'androidx.viewpager2:viewpager2:1.1.0-beta02'
230231
implementation "androidx.work:work-runtime-ktx:${androidxWorkVersion}"
231232
implementation "androidx.work:work-rxjava3:${androidxWorkVersion}"
232-
implementation 'com.google.android.material:material:1.9.0'
233+
implementation 'com.google.android.material:material:1.11.0'
233234

234235
/** Third-party libraries **/
235236
// Instance state boilerplate elimination
236237
implementation "frankiesardo:icepick:${icepickVersion}"
237238
kapt "frankiesardo:icepick-processor:${icepickVersion}"
238239

239240
// HTML parser
240-
implementation "org.jsoup:jsoup:1.16.1"
241+
implementation "org.jsoup:jsoup:1.16.2"
241242

242243
// HTTP client
243-
implementation "com.squareup.okhttp3:okhttp:4.11.0"
244-
// okhttp3:4.11.0 introduces a vulnerability from com.squareup.okio:okio@3.3.0,
245-
// remove com.squareup.okio:okio when updating okhttp
246-
implementation "com.squareup.okio:okio:3.4.0"
244+
implementation "com.squareup.okhttp3:okhttp:4.12.0"
247245

248246
// Media player
249247
implementation "com.google.android.exoplayer:exoplayer-core:${exoPlayerVersion}"
@@ -272,19 +270,19 @@ dependencies {
272270
implementation "io.noties.markwon:linkify:${markwonVersion}"
273271

274272
// Crash reporting
275-
implementation "ch.acra:acra-core:5.10.1"
273+
implementation "ch.acra:acra-core:5.11.3"
276274

277275
// Properly restarting
278276
implementation 'com.jakewharton:process-phoenix:2.1.2'
279277

280278
// Reactive extensions for Java VM
281-
implementation "io.reactivex.rxjava3:rxjava:3.1.6"
279+
implementation "io.reactivex.rxjava3:rxjava:3.1.8"
282280
implementation "io.reactivex.rxjava3:rxandroid:3.0.2"
283281
// RxJava binding APIs for Android UI widgets
284282
implementation "com.jakewharton.rxbinding4:rxbinding:4.0.0"
285283

286284
// Date and time formatting
287-
implementation "org.ocpsoft.prettytime:prettytime:5.0.6.Final"
285+
implementation "org.ocpsoft.prettytime:prettytime:5.0.7.Final"
288286

289287
/** Debugging **/
290288
// Memory leak detection
@@ -297,13 +295,12 @@ dependencies {
297295

298296
/** Testing **/
299297
testImplementation 'junit:junit:4.13.2'
300-
testImplementation "org.mockito:mockito-core:${mockitoVersion}"
301-
testImplementation "org.mockito:mockito-inline:${mockitoVersion}"
298+
testImplementation 'org.mockito:mockito-core:5.6.0'
302299

303300
androidTestImplementation "androidx.test.ext:junit:1.1.5"
304301
androidTestImplementation "androidx.test:runner:1.5.2"
305302
androidTestImplementation "androidx.room:room-testing:${androidxRoomVersion}"
306-
androidTestImplementation "org.assertj:assertj-core:3.23.1"
303+
androidTestImplementation "org.assertj:assertj-core:3.24.2"
307304
}
308305

309306
static String getGitWorkingBranch() {

app/src/main/java/org/schabi/newpipe/database/Converters.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import java.time.Instant
77
import java.time.OffsetDateTime
88
import java.time.ZoneOffset
99

10-
object Converters {
10+
class Converters {
1111
/**
1212
* Convert a long value to a [OffsetDateTime].
1313
*
@@ -47,6 +47,6 @@ object Converters {
4747

4848
@TypeConverter
4949
fun feedGroupIconOf(id: Int): FeedGroupIcon {
50-
return FeedGroupIcon.values().first { it.id == id }
50+
return FeedGroupIcon.entries.first { it.id == id }
5151
}
5252
}

app/src/main/java/org/schabi/newpipe/local/feed/service/FeedEventManager.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ object FeedEventManager {
2626
}
2727

2828
sealed class Event {
29-
object IdleEvent : Event()
29+
data object IdleEvent : Event()
3030
data class ProgressEvent(val currentProgress: Int = -1, val maxProgress: Int = -1, @StringRes val progressMessage: Int = 0) : Event() {
3131
constructor(@StringRes progressMessage: Int) : this(-1, -1, progressMessage)
3232
}

app/src/main/java/org/schabi/newpipe/local/subscription/dialog/FeedGroupDialog.kt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,10 @@ class FeedGroupDialog : DialogFragment(), BackPressable {
5555
private var groupSortOrder: Long = -1
5656

5757
sealed class ScreenState : Serializable {
58-
object InitialScreen : ScreenState()
59-
object IconPickerScreen : ScreenState()
60-
object SubscriptionsPickerScreen : ScreenState()
61-
object DeleteScreen : ScreenState()
58+
data object InitialScreen : ScreenState()
59+
data object IconPickerScreen : ScreenState()
60+
data object SubscriptionsPickerScreen : ScreenState()
61+
data object DeleteScreen : ScreenState()
6262
}
6363

6464
@State @JvmField var selectedIcon: FeedGroupIcon? = null
@@ -370,7 +370,7 @@ class FeedGroupDialog : DialogFragment(), BackPressable {
370370

371371
private fun setupIconPicker() {
372372
val groupAdapter = GroupieAdapter()
373-
groupAdapter.addAll(FeedGroupIcon.values().map { PickerIconItem(it) })
373+
groupAdapter.addAll(FeedGroupIcon.entries.map { PickerIconItem(it) })
374374

375375
feedGroupCreateBinding.iconSelector.apply {
376376
layoutManager = GridLayoutManager(requireContext(), 7, RecyclerView.VERTICAL, false)

app/src/main/java/org/schabi/newpipe/local/subscription/dialog/FeedGroupDialogViewModel.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,8 @@ class FeedGroupDialogViewModel(
110110
}
111111

112112
sealed class DialogEvent {
113-
object ProcessingEvent : DialogEvent()
114-
object SuccessEvent : DialogEvent()
113+
data object ProcessingEvent : DialogEvent()
114+
data object SuccessEvent : DialogEvent()
115115
}
116116

117117
data class Filter(val query: String, val showOnlyUngrouped: Boolean)

app/src/test/java/org/schabi/newpipe/local/subscription/FeedGroupIconTest.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class FeedGroupIconTest {
99
fun `No gaps and repeated ids`() {
1010
val usedIds = HashSet<Int>()
1111

12-
for ((shouldBeId, currentIcon) in FeedGroupIcon.values().withIndex()) {
12+
for ((shouldBeId, currentIcon) in FeedGroupIcon.entries.withIndex()) {
1313
val added = usedIds.add(currentIcon.id)
1414
assertTrue("Repeated ids (current item: ${currentIcon.name} - ${currentIcon.id})", added)
1515

@@ -24,7 +24,7 @@ class FeedGroupIconTest {
2424
fun `No icons pointing to the same attr`() {
2525
val usedIcons = HashSet<Int>()
2626

27-
for (groupIcon in FeedGroupIcon.values()) {
27+
for (groupIcon in FeedGroupIcon.entries) {
2828
val added = usedIcons.add(groupIcon.drawableResource)
2929
assertTrue("Repeated icon (current item: ${groupIcon.name} - ${groupIcon.id})", added)
3030
}

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
// Top-level build file where you can add configuration options common to all sub-projects/modules.
22

33
buildscript {
4-
ext.kotlin_version = '1.8.22'
4+
ext.kotlin_version = '1.9.10'
55
repositories {
66
google()
77
mavenCentral()
88
}
99
dependencies {
10-
classpath 'com.android.tools.build:gradle:8.1.1'
10+
classpath 'com.android.tools.build:gradle:8.2.0'
1111
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
1212

1313
// NOTE: Do not place your application dependencies here; they belong
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionSha256Sum=e111cb9948407e26351227dabce49822fb88c37ee72f1d1582a69c68af2e702f
4-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
3+
distributionSha256Sum=38f66cd6eef217b4c35855bb11ea4e9fbc53594ccccb5fb82dfd317ef8c2c5a3
4+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
55
networkTimeout=10000
66
zipStoreBase=GRADLE_USER_HOME
77
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)