Skip to content

Commit

Permalink
Merge branch 'refactor' into Video-description-compose
Browse files Browse the repository at this point in the history
# 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
  • Loading branch information
Isira-Seneviratne committed Nov 21, 2024
2 parents 1f4298b + 295f719 commit cd96927
Show file tree
Hide file tree
Showing 103 changed files with 2,205 additions and 1,641 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ jobs:
BRANCH: ${{ github.head_ref }}
run: git checkout -B "$BRANCH"

- name: set up JDK 17
- name: set up JDK
uses: actions/setup-java@v4
with:
java-version: 17
java-version: 21
distribution: "temurin"
cache: 'gradle'

Expand Down Expand Up @@ -88,10 +88,10 @@ jobs:
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm
- name: set up JDK 17
- name: set up JDK
uses: actions/setup-java@v4
with:
java-version: 17
java-version: 21
distribution: "temurin"
cache: 'gradle'

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

- name: Set up JDK 17
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: 17
java-version: 21
distribution: "temurin"
cache: 'gradle'

Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ captures/
*.class
app/debug/
app/release/
.kotlin/

# vscode / eclipse files
*.classpath
Expand Down
36 changes: 29 additions & 7 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ plugins {
id "checkstyle"
id "org.sonarqube" version "4.0.0.2929"
id "org.jetbrains.kotlin.plugin.compose" version "${kotlin_version}"
id 'com.google.dagger.hilt.android'
}

android {
Expand Down Expand Up @@ -94,6 +95,7 @@ android {
buildFeatures {
viewBinding true
compose true
buildConfig true
}

packagingOptions {
Expand All @@ -114,14 +116,16 @@ ext {
androidxRoomVersion = '2.6.1'
androidxWorkVersion = '2.8.1'

icepickVersion = '3.2.0'
stateSaverVersion = '1.4.1'
exoPlayerVersion = '2.18.7'
googleAutoServiceVersion = '1.1.1'
groupieVersion = '2.10.1'
markwonVersion = '4.6.2'

leakCanaryVersion = '2.12'
stethoVersion = '1.6.0'

coilVersion = '3.0.3'
}

configurations {
Expand Down Expand Up @@ -190,6 +194,10 @@ sonar {
}
}

kapt {
correctErrorTypes true
}

dependencies {
/** Desugaring **/
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs_nio:2.0.4'
Expand All @@ -200,7 +208,8 @@ dependencies {
// name and the commit hash with the commit hash of the (pushed) commit you want to test
// This works thanks to JitPack: https://jitpack.io/
implementation 'com.github.TeamNewPipe:nanojson:1d9e1aea9049fc9f85e68b43ba39fe7be1c1f751'
implementation 'com.github.TeamNewPipe:NewPipeExtractor:v0.24.2'
// WORKAROUND: v0.24.2 can't be resolved by jitpack -> use git commit hash instead
implementation 'com.github.TeamNewPipe:NewPipeExtractor:d3d5f2b3f03a5f2b479b9f6fdf1c2555cbb9de0e'
implementation 'com.github.TeamNewPipe:NoNonsense-FilePicker:5.0.0'

/** Checkstyle **/
Expand Down Expand Up @@ -236,8 +245,9 @@ dependencies {

/** Third-party libraries **/
// Instance state boilerplate elimination
implementation "frankiesardo:icepick:${icepickVersion}"
kapt "frankiesardo:icepick-processor:${icepickVersion}"
implementation 'com.github.livefront:bridge:v2.0.2'
implementation "com.evernote:android-state:$stateSaverVersion"
kapt "com.evernote:android-state-processor:$stateSaverVersion"

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

// Image loading
implementation 'io.coil-kt:coil-compose:2.7.0'
implementation "io.coil-kt.coil3:coil-compose:${coilVersion}"
implementation "io.coil-kt.coil3:coil-network-okhttp:${coilVersion}"

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

// Jetpack Compose
implementation(platform('androidx.compose:compose-bom:2024.09.00'))
implementation(platform('androidx.compose:compose-bom:2024.10.01'))
implementation 'androidx.compose.material3:material3'
implementation 'androidx.compose.material3.adaptive:adaptive'
implementation 'androidx.activity:activity-compose'
implementation 'androidx.compose.ui:ui-tooling-preview'
implementation 'androidx.lifecycle:lifecycle-viewmodel-compose'
implementation 'androidx.compose.ui:ui-text' // Needed for parsing HTML to AnnotatedString
implementation 'androidx.compose.material:material-icons-extended'

// Jetpack Compose related dependencies
implementation 'androidx.paging:paging-compose:3.3.2'
implementation 'com.github.nanihadesuka:LazyColumnScrollbar:2.2.0'
implementation "androidx.navigation:navigation-compose:2.8.3"

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

// Hilt
implementation("com.google.dagger:hilt-android:2.51.1")
kapt("com.google.dagger:hilt-compiler:2.51.1")

// Scroll
implementation 'com.github.nanihadesuka:LazyColumnScrollbar:2.2.0'

/** Debugging **/
// Memory leak detection
debugImplementation "com.squareup.leakcanary:leakcanary-object-watcher-android:${leakCanaryVersion}"
Expand Down
9 changes: 0 additions & 9 deletions app/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,6 @@
## Rules for ExoPlayer
-keep class com.google.android.exoplayer2.** { *; }

## Rules for Icepick. Copy pasted from https://github.com/frankiesardo/icepick
-dontwarn icepick.**
-keep class icepick.** { *; }
-keep class **$$Icepick { *; }
-keepclasseswithmembernames class * {
@icepick.* <fields>;
}
-keepnames class * { @icepick.State *;}

## Rules for OkHttp. Copy pasted from https://github.com/square/okhttp
-dontwarn okhttp3.**
-dontwarn okio.**
Expand Down
5 changes: 5 additions & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,11 @@
android:exported="false"
android:label="@string/settings" />

<activity
android:name=".settings.SettingsV2Activity"
android:exported="true"
android:label="@string/settings" />

<activity
android:name=".about.AboutActivity"
android:exported="false"
Expand Down
Loading

0 comments on commit cd96927

Please sign in to comment.