NewPipe icon indicating copy to clipboard operation
NewPipe copied to clipboard

Depend directly on NewPipeExtractor's git repository

Open Stypox opened this issue 1 month ago • 0 comments

  • [x] Codebase improvement (dev facing)

Description of the changes in your PR

This is an experimental attempt at replacing Jitpack dependencies (which often stop working and cause CI/local failures) with a direct dependency on a git repository. This relies on the includegit Gradle plugin. I have been using this approach for some time in Dicio's settings.gradle.kts and it has worked well so far, but for NewPipe it works well only to include NewPipeExtractor. There are some issue nanojson and FilePicker because:

  • nanojson is not a gradle project, and thus cannot be built by gradle
  • FilePicker is using a very old version of gradle, and while that's not a problem when the project is built on its own, when importing is as a subproject it gets built with the same gradle version as NewPipe, which causes gradle issues

However, for some reason we've been using the same Jitpack artifacts for the FilePicker and for nanojson since ages without issues, it's just NewPipeExtractor artifacts that sometimes disappear. And we're going to put FilePicker and nanojson on maven central soon.

So this PR might still be useful, however be aware of the limitations and feel free to reject it. Note that the code could possibly be simplified, as it was designed to handle multiple git dependencies but here we have only one.

A nice thing that this PR introduces is the ability to use a local copy of NewPipeExtractor by just adding useLocalNewPipeExtractor=true to local.properties, instead of having to manually modify settings.gradle.kts like before.

Fixes the following issue(s)

  • Fixes #12463

Relies on the following changes

  • currently points NewPipeExtractor to https://github.com/TeamNewPipe/NewPipeExtractor/commit/724cc46f422a647884021d156bb0242784309843 (https://github.com/TeamNewPipe/NewPipeExtractor/pull/1409), which uses a compatible gradle version

APK testing

The APK can be found by going to the "Checks" tab below the title. On the left pane, click on "CI", scroll down to "artifacts" and click "app" to download the zip file which contains the debug APK of this PR. You can find more info and a video demonstration on this wiki page.

Due diligence

Stypox avatar Nov 27 '25 13:11 Stypox