Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Guava-dependency conflicts with android gradle plugin 0.14.0 #39

Open
laborg opened this issue Nov 3, 2014 · 2 comments
Open

Guava-dependency conflicts with android gradle plugin 0.14.0 #39

laborg opened this issue Nov 3, 2014 · 2 comments

Comments

@laborg
Copy link

laborg commented Nov 3, 2014

Hi,

org.jfrog.buildinfo:build-info-extractor-gradle:3.0.1 depends on guava 10.0.1
com.android.tools.build:gradle.0.14.0 depends on guava 17.0

This leads to a problem in BuildInfoExtractorUtils.mergePropertiesWithSystemAndPropertyFile() because guavas com.google.common.io.Closeables.closeQuietly(Ljava/io/Closeable) isn't found in guava 17.0 resulting in an error while building on Jenkins:

Caused by: java.lang.NoSuchMethodError: com.google.common.io.Closeables.closeQuietly(Ljava/io/Closeable;)V
    at org.jfrog.build.extractor.BuildInfoExtractorUtils.mergePropertiesWithSystemAndPropertyFile(BuildInfoExtractorUtils.java:79)
    at org.jfrog.gradle.plugin.artifactory.extractor.GradleArtifactoryClientConfigUpdater.update(GradleArtifactoryClientConfigUpdater.java:64)

The funny thing is, that the source code of BuildInfoExtractorUtils indicates that the parameter is a FileInputStream and therefore shouldn't be causing the error.

Similar issue: https://issues.jenkins-ci.org/browse/JENKINS-23794

The intermediate workaround is to force guava:15.0 as dependency conflict resolution:

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath ('com.google.guava:guava:15.0'){
            force = true
        }
        classpath('com.android.tools.build:gradle:0.14.0')
        classpath('org.jfrog.buildinfo:build-info-extractor-gradle:3.0.1')
    }
}
@PatricioMP
Copy link

Thanks @laborg, you save my day!

The workaround works.

@Jan-Pleva
Copy link

The problem with Guava is still there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants