NewPipeExtractor icon indicating copy to clipboard operation
NewPipeExtractor copied to clipboard

Gradle unable to download NewPipeExtractor

Open Mek101 opened this issue 2 years ago • 9 comments

Despite adding the implementation line as described in the README, gradle searches for the artifact in the wrong urls, specifically it searches for them in the extractor and NewPipeExtractor subdirectories which don't exist.

It tries to open https://jitpack.io/com/github/TeamNewPipe/NewPipeExtractor/extractor/v0.22.1/extractor-v0.22.1.pom https://jitpack.io/com/github/TeamNewPipe/NewPipeExtractor/NewPipeExtractor/v0.22.1/NewPipeExtractor-v0.22.1.pom While the correct url is https://jitpack.io/com/github/TeamNewPipe/NewPipeExtractor/v0.22.1/NewPipeExtractor-v0.22.1.pom

Could not determine the dependencies of task ':run'.
> Could not resolve all dependencies for configuration ':runtimeClasspath'.
   > Could not create task ':jar'.
      > Could not resolve all files for configuration ':compileClasspath'.
         > Could not find com.github.TeamNewPipe.NewPipeExtractor:extractor:v0.22.1.
           Searched in the following locations:
             - https://repo.maven.apache.org/maven2/com/github/TeamNewPipe/NewPipeExtractor/extractor/v0.22.1/extractor-v0.22.1.pom
             - https://jitpack.io/com/github/TeamNewPipe/NewPipeExtractor/extractor/v0.22.1/extractor-v0.22.1.pom
           Required by:
               project : > com.github.TeamNewPipe:NewPipeExtractor:v0.22.1
         > Could not find com.github.TeamNewPipe.NewPipeExtractor:NewPipeExtractor:v0.22.1.
           Searched in the following locations:
             - https://repo.maven.apache.org/maven2/com/github/TeamNewPipe/NewPipeExtractor/NewPipeExtractor/v0.22.1/NewPipeExtractor-v0.22.1.pom
             - https://jitpack.io/com/github/TeamNewPipe/NewPipeExtractor/NewPipeExtractor/v0.22.1/NewPipeExtractor-v0.22.1.pom
           Required by:
               project : > com.github.TeamNewPipe:NewPipeExtractor:v0.22.1
         > Could not find com.github.TeamNewPipe.NewPipeExtractor:timeago-parser:v0.22.1.
           Searched in the following locations:
             - https://repo.maven.apache.org/maven2/com/github/TeamNewPipe/NewPipeExtractor/timeago-parser/v0.22.1/timeago-parser-v0.22.1.pom
             - https://jitpack.io/com/github/TeamNewPipe/NewPipeExtractor/timeago-parser/v0.22.1/timeago-parser-v0.22.1.pom
           Required by:
               project : > com.github.TeamNewPipe:NewPipeExtractor:v0.22.1

For reference, this is my build.gradle.kts:

plugins {
    kotlin("jvm") version "1.8.0"
    application
}

group = "org.example"
version = "1.0-SNAPSHOT"

repositories {
    mavenCentral()
    maven {
        url = uri("https://jitpack.io")
    }
}

dependencies {
    implementation("com.github.TeamNewPipe:NewPipeExtractor:v0.22.1")

    testImplementation(kotlin("test"))
}

tasks.test {
    useJUnitPlatform()
}

application {
    mainClass.set("MainKt")
}

tasks.jar {
    manifest {
        attributes["Main-Class"] = "MainKt"
    }
    configurations["compileClasspath"].forEach { file: File ->
        from(zipTree(file.absoluteFile))
    }
    duplicatesStrategy = DuplicatesStrategy.INCLUDE
}

Mek101 avatar May 22 '23 09:05 Mek101

Had the same issue. After hours of time wasted, I just forked this repo and replaced the line

implementation 'com.github.TeamNewPipe:NewPipeExtractor:v0.22.6' with

implementation 'com.github.alpenamilch:NewPipeExtractor:v0.22.6'

it does compile successfully. I have no idea why it is like that.

alpenamilch avatar May 28 '23 08:05 alpenamilch

Could it be that it's because TeamNewPipe is an organization?

Mek101 avatar May 28 '23 09:05 Mek101

Solved it! Seems it's case sensitive. "com.github.teamnewpipe:NewPipeExtractor:v0.22.6" worked fine

bqv avatar Jul 05 '23 22:07 bqv

Solved it! Seems it's case sensitive. "com.github.teamnewpipe:NewPipeExtractor:v0.22.6" worked fine

Yes, it works :\

LunevNF avatar Jul 19 '23 03:07 LunevNF

Seems it's case sensitive

Thats strange, I went to Jitpack and copied dependency from their website, but still failed Screenshot 2023-08-21 at 20 46 26

shalva97 avatar Aug 21 '23 16:08 shalva97

Any other workaround? I can not make it work, but It works with other libraries from Jitpack

shalva97 avatar Aug 22 '23 18:08 shalva97

You have other problems @shalva97 it is case-sensitive. Works fine for all. Verify your config. (Don't just thumbs down)

alpenamilch avatar Aug 24 '23 11:08 alpenamilch

it is caused by JVM toolchain. For some reason Intellij generates new projects with jvmToolchain(8), it should be changed to jvmToolchain(11). Also TeamNewPipe in the library name should be on lowercase. Example:

plugins {
    kotlin("jvm") version "1.9.0"
    application
}

group = "org.example"
version = "1.0-SNAPSHOT"

repositories {
    mavenCentral()
    maven { setUrl("https://jitpack.io") }
}

dependencies {
    testImplementation(kotlin("test"))
    implementation("com.github.teamnewpipe:NewPipeExtractor:v0.22.7")
}

tasks.test {
    useJUnitPlatform()
}

kotlin {
    jvmToolchain(11)
}

application {
    mainClass.set("MainKt")
}

shalva97 avatar Sep 20 '23 17:09 shalva97

teamnewpipe

strangely it works 👍🏻 thanks so much

wingsum93 avatar Oct 10 '23 17:10 wingsum93