Skip to content

Commit cd96927

Browse files
Merge branch 'refactor' into Video-description-compose
# Conflicts: # app/build.gradle # app/src/main/java/org/schabi/newpipe/fragments/detail/DescriptionFragment.java # app/src/main/java/org/schabi/newpipe/fragments/list/channel/ChannelAboutFragment.java # app/src/main/java/org/schabi/newpipe/ui/components/items/ItemList.kt # app/src/main/java/org/schabi/newpipe/ui/components/items/stream/StreamMenu.kt
2 parents 1f4298b + 295f719 commit cd96927

103 files changed

Lines changed: 2205 additions & 1641 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@ jobs:
4747
BRANCH: ${{ github.head_ref }}
4848
run: git checkout -B "$BRANCH"
4949

50-
- name: set up JDK 17
50+
- name: set up JDK
5151
uses: actions/setup-java@v4
5252
with:
53-
java-version: 17
53+
java-version: 21
5454
distribution: "temurin"
5555
cache: 'gradle'
5656

@@ -88,10 +88,10 @@ jobs:
8888
sudo udevadm control --reload-rules
8989
sudo udevadm trigger --name-match=kvm
9090
91-
- name: set up JDK 17
91+
- name: set up JDK
9292
uses: actions/setup-java@v4
9393
with:
94-
java-version: 17
94+
java-version: 21
9595
distribution: "temurin"
9696
cache: 'gradle'
9797

@@ -121,10 +121,10 @@ jobs:
121121
with:
122122
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
123123

124-
- name: Set up JDK 17
124+
- name: Set up JDK
125125
uses: actions/setup-java@v4
126126
with:
127-
java-version: 17
127+
java-version: 21
128128
distribution: "temurin"
129129
cache: 'gradle'
130130

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ captures/
1010
*.class
1111
app/debug/
1212
app/release/
13+
.kotlin/
1314

1415
# vscode / eclipse files
1516
*.classpath

app/build.gradle

Lines changed: 29 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ plugins {
1010
id "checkstyle"
1111
id "org.sonarqube" version "4.0.0.2929"
1212
id "org.jetbrains.kotlin.plugin.compose" version "${kotlin_version}"
13+
id 'com.google.dagger.hilt.android'
1314
}
1415

1516
android {
@@ -94,6 +95,7 @@ android {
9495
buildFeatures {
9596
viewBinding true
9697
compose true
98+
buildConfig true
9799
}
98100

99101
packagingOptions {
@@ -114,14 +116,16 @@ ext {
114116
androidxRoomVersion = '2.6.1'
115117
androidxWorkVersion = '2.8.1'
116118

117-
icepickVersion = '3.2.0'
119+
stateSaverVersion = '1.4.1'
118120
exoPlayerVersion = '2.18.7'
119121
googleAutoServiceVersion = '1.1.1'
120122
groupieVersion = '2.10.1'
121123
markwonVersion = '4.6.2'
122124

123125
leakCanaryVersion = '2.12'
124126
stethoVersion = '1.6.0'
127+
128+
coilVersion = '3.0.3'
125129
}
126130

127131
configurations {
@@ -190,6 +194,10 @@ sonar {
190194
}
191195
}
192196

197+
kapt {
198+
correctErrorTypes true
199+
}
200+
193201
dependencies {
194202
/** Desugaring **/
195203
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs_nio:2.0.4'
@@ -200,7 +208,8 @@ dependencies {
200208
// name and the commit hash with the commit hash of the (pushed) commit you want to test
201209
// This works thanks to JitPack: https://jitpack.io/
202210
implementation 'com.github.TeamNewPipe:nanojson:1d9e1aea9049fc9f85e68b43ba39fe7be1c1f751'
203-
implementation 'com.github.TeamNewPipe:NewPipeExtractor:v0.24.2'
211+
// WORKAROUND: v0.24.2 can't be resolved by jitpack -> use git commit hash instead
212+
implementation 'com.github.TeamNewPipe:NewPipeExtractor:d3d5f2b3f03a5f2b479b9f6fdf1c2555cbb9de0e'
204213
implementation 'com.github.TeamNewPipe:NoNonsense-FilePicker:5.0.0'
205214

206215
/** Checkstyle **/
@@ -236,8 +245,9 @@ dependencies {
236245

237246
/** Third-party libraries **/
238247
// Instance state boilerplate elimination
239-
implementation "frankiesardo:icepick:${icepickVersion}"
240-
kapt "frankiesardo:icepick-processor:${icepickVersion}"
248+
implementation 'com.github.livefront:bridge:v2.0.2'
249+
implementation "com.evernote:android-state:$stateSaverVersion"
250+
kapt "com.evernote:android-state-processor:$stateSaverVersion"
241251

242252
// HTML parser
243253
implementation "org.jsoup:jsoup:1.17.2"
@@ -264,7 +274,8 @@ dependencies {
264274
implementation "com.github.lisawray.groupie:groupie-viewbinding:${groupieVersion}"
265275

266276
// Image loading
267-
implementation 'io.coil-kt:coil-compose:2.7.0'
277+
implementation "io.coil-kt.coil3:coil-compose:${coilVersion}"
278+
implementation "io.coil-kt.coil3:coil-network-okhttp:${coilVersion}"
268279

269280
// Markdown library for Android
270281
implementation "io.noties.markwon:core:${markwonVersion}"
@@ -286,18 +297,29 @@ dependencies {
286297
implementation "org.ocpsoft.prettytime:prettytime:5.0.8.Final"
287298

288299
// Jetpack Compose
289-
implementation(platform('androidx.compose:compose-bom:2024.09.00'))
300+
implementation(platform('androidx.compose:compose-bom:2024.10.01'))
290301
implementation 'androidx.compose.material3:material3'
291302
implementation 'androidx.compose.material3.adaptive:adaptive'
292303
implementation 'androidx.activity:activity-compose'
293304
implementation 'androidx.compose.ui:ui-tooling-preview'
294305
implementation 'androidx.lifecycle:lifecycle-viewmodel-compose'
306+
implementation 'androidx.compose.ui:ui-text' // Needed for parsing HTML to AnnotatedString
307+
implementation 'androidx.compose.material:material-icons-extended'
308+
309+
// Jetpack Compose related dependencies
295310
implementation 'androidx.paging:paging-compose:3.3.2'
296-
implementation 'com.github.nanihadesuka:LazyColumnScrollbar:2.2.0'
311+
implementation "androidx.navigation:navigation-compose:2.8.3"
297312

298313
// Coroutines interop
299314
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-rx3:1.8.1'
300315

316+
// Hilt
317+
implementation("com.google.dagger:hilt-android:2.51.1")
318+
kapt("com.google.dagger:hilt-compiler:2.51.1")
319+
320+
// Scroll
321+
implementation 'com.github.nanihadesuka:LazyColumnScrollbar:2.2.0'
322+
301323
/** Debugging **/
302324
// Memory leak detection
303325
debugImplementation "com.squareup.leakcanary:leakcanary-object-watcher-android:${leakCanaryVersion}"

app/proguard-rules.pro

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,6 @@
1313
## Rules for ExoPlayer
1414
-keep class com.google.android.exoplayer2.** { *; }
1515

16-
## Rules for Icepick. Copy pasted from https://github.com/frankiesardo/icepick
17-
-dontwarn icepick.**
18-
-keep class icepick.** { *; }
19-
-keep class **$$Icepick { *; }
20-
-keepclasseswithmembernames class * {
21-
@icepick.* <fields>;
22-
}
23-
-keepnames class * { @icepick.State *;}
24-
2516
## Rules for OkHttp. Copy pasted from https://github.com/square/okhttp
2617
-dontwarn okhttp3.**
2718
-dontwarn okio.**

app/src/main/AndroidManifest.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,11 @@
7777
android:exported="false"
7878
android:label="@string/settings" />
7979

80+
<activity
81+
android:name=".settings.SettingsV2Activity"
82+
android:exported="true"
83+
android:label="@string/settings" />
84+
8085
<activity
8186
android:name=".about.AboutActivity"
8287
android:exported="false"

0 commit comments

Comments
 (0)