bintray / gradle-bintray-plugin

Apache License 2.0
1.28k stars 193 forks source link

Could not find org.codehaus.groovy.modules.http-builder:http-builder:0.7.2. #346

Open DhavalsShah opened 1 year ago

DhavalsShah commented 1 year ago

In one of our android app module, bintray dependency has been used with version: 1.7.3. "com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3"

While generating signed APK, the build is failing due to missing pom file of HTTP-Builder-0.7.2, which is the dependency used by the bintray plugin.

image

We tried by upgrading the bintray plugin with 1.8.5, but the issue persists since this plugin version also uses the HTTP-Builder-0.7.2 version.

While going through the bintray's buil.gradle file, we noticed, that testCompile uses the HTTP-Builder library version 0.7.1 and while building the application same dependency is having version 0.7.2 defined. Hence, there could be a chance that build will not be failing during testing but android build got failed while generating the signed build.

Can anybody help to share steps to resolve the same?

btseytlinTCP commented 1 month ago

Yes, same here. I don't have a solution.

Probably due to the hosting change: https://blog.gradle.org/portal-jcenter-impact

The Gradle Plugin Portal will continue to return redirects (303 See Other) for artifact queries it cannot serve. Starting July 15, 2024, these redirects will be towards [Maven Central](https://repo.maven.apache.org/maven2) instead of JCenter.

classpath "com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.5"

Seems Maven only has 0.7.1.

 > Could not resolve all artifacts for configuration ':classpath'.
   > Could not find org.codehaus.groovy.modules.http-builder:http-builder:0.7.2.
     Searched in the following locations:
       - https://dl.google.com/dl/android/maven2/org/codehaus/groovy/modules/http-builder/http-builder/0.7.2/http-builder-0.7.2.pom
       - https://repo.maven.apache.org/maven2/org/codehaus/groovy/modules/http-builder/http-builder/0.7.2/http-builder-0.7.2.pom
       - https://plugins.gradle.org/m2/org/codehaus/groovy/modules/http-builder/http-builder/0.7.2/http-builder-0.7.2.pom
     Required by:
         project : > com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.5
btseytlinTCP commented 1 month ago

I guess i'll try replacing out Bintray: https://plugins.gradle.org/docs/bintray

fuzzball1980 commented 1 month ago

Same issue here! @btseytlinTCP looks like the replacement need to be done by the plugin author. Im trapped with this plugin since im using an old preprocessor plugin that depends on this project.

@eyalbe4 @yoav I have not expertise on building plugins, but anything I can help to move the pluging to Gradle publish plugin and update the org.codehaus.groovy.modules.http-builder:http-builder:0.7.2 dependency let me know!

Thank you very much!

gabrielle88 commented 1 month ago

@fuzzball1980 did you found any solution for this? We are facing with the same error. I understand that the plugin authors are informed about the JCenter shutdown. We hope that those still maintaining their plugins will be able to address the situation.

btseytlinTCP commented 1 month ago

I removed the library, but dont have a solution

marain87 commented 1 month ago

We also encountered this error because version 0.7.2 is not available in Maven Central.

To temporarily fix this, we added “jcenter()” back to the project repositories. Although JCenter is closed, the jar file can still be found there...

uranashel44 commented 2 weeks ago

My solution is download the jar files, and add it as library, and remove the gradle plugin line. The jar files still be overthere. It can work.

cuongapero commented 2 weeks ago

My solution is download the jar files, and add it as library, and remove the gradle plugin line. The jar files still be overthere. It can work.

Hi, what jar you dowloaded, I downloaded "com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4" and remove gradle plugin line but still error

uranashel44 commented 2 weeks ago

@cuongapero Firstly, you should add the following Maven repository to your build.gradle file:

maven { url 'https://plugins.gradle.org/m2' }

And do downloading 2 required Jar files:

Bintray Plugin: 1.8.5 https://mvnrepository.com/artifact/com.jfrog.bintray.gradle/gradle-bintray-plugin/1.8.5

HTTPBuilder Library: 0.7.2 https://mvnrepository.com/artifact/org.codehaus.groovy.modules.http-builder/http-builder/0.7.2

Once downloaded, add these JAR files to your project as libraries using the Project Structure dialog in Android Studio. This ensures that they are properly linked and included in your build process.

cuongapero commented 2 weeks ago

@cuongapero Firstly, you should add the following Maven repository to your build.gradle file:

maven { url 'https://plugins.gradle.org/m2' }

And do downloading 2 required Jar files:

Bintray Plugin: 1.8.5 https://mvnrepository.com/artifact/com.jfrog.bintray.gradle/gradle-bintray-plugin/1.8.5

HTTPBuilder Library: 0.7.2 https://mvnrepository.com/artifact/org.codehaus.groovy.modules.http-builder/http-builder/0.7.2

Once downloaded, add these JAR files to your project as libraries using the Project Structure dialog in Android Studio. This ensures that they are properly linked and included in your build process.

But after fixing this error, I have a problem with 5 dependency libraries not found, the solution is I have to download the source code and import them as modules ?

uranashel44 commented 2 weeks ago

@cuongapero

Just curious, what exactly 5 dependencies not found? Isnt the rootcause here just about can not file pom or jar file while using gradle plugin portal?

cuongapero commented 2 weeks ago

@cuongapero

Just curious, what exactly 5 dependencies not found? Isnt the rootcause here just about can not file pom or jar file while using gradle plugin portal?

Some libs like com.duolingo.open:rtl-viewpager:1.0.3 com.kevalpatel2106:ruler-picker:1.1 ...

JackRo commented 1 week ago

you could fix it like below, because your android app build doesn't need gradle-bintray-plugin

buildscript {
    repositories {
        google()
        mavenCentral()
        gradlePluginPortal()
    }

    dependencies {
        classpath('com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3') {
            exclude group: 'org.codehaus.groovy.modules.http-builder', module: 'http-builder'
        }
    }
}