build-info icon indicating copy to clipboard operation
build-info copied to clipboard

No signature of method: org.gradle.api.internal.tasks.RealizableTaskCollection.configureEach

Open diamondo25 opened this issue 4 years ago • 5 comments

> Failed to apply plugin [id 'com.jfrog.artifactory']
   > No signature of method: org.gradle.api.internal.tasks.RealizableTaskCollection.configureEach() is applicable for argument types: (org.jfrog.gradle.plugin.artifactory.ArtifactoryPluginBase$_addModuleInfoTask_closure1) values: [org.jfrog.gradle.plugin.artifactory.ArtifactoryPluginBase$_addModuleInfoTask_closure1@3a86c166]

This error randomly appeared after the latest version of the build-info-extractor-gradle release. 4.15.1 does not have this issue.

https://github.com/jfrog/build-info/compare/build-info-gradle-extractor-4.15.1...build-info-gradle-extractor-4.15.2

I'm unable to figure out why it happens, so i've included the build.gradle, maybe you can figure it out.

buildscript {
    repositories {
        jcenter()
        maven {
            name 'forge'
            url 'http://files.minecraftforge.net/maven'
        }
    }
    dependencies {
        classpath "org.jfrog.buildinfo:build-info-extractor-gradle:4.15.2"
    }
}

apply plugin: 'com.jfrog.artifactory'

This code already triggers the exception. I think its related to the gradle version, which is 4.4. Updating to 6.3 through gradlew wrapper --gradle-version 6.3 did not help.

FAILURE: Build failed with an exception.

* What went wrong:
java.lang.ExceptionInInitializerError (no error message)
> org.gradle.api.internal.file.DefaultSourceDirectorySet.<init>(java.lang.String, org.gradle.api.internal.file.FileResolver, org.gradle.api.internal.file.collections.DirectoryFileTreeFactory)

diamondo25 avatar Apr 24 '20 16:04 diamondo25

Just seconding the post. The project I'm trying to build is https://github.com/jfrog/project-examples/tree/master/gradle-examples/gradle-cache-example

sophiataskova avatar Jun 23 '20 23:06 sophiataskova

You can downgrade to 4.15.1 to fix the build

diamondo25 avatar Jun 24 '20 06:06 diamondo25

You can downgrade to 4.15.1 to fix the build

same problem and spend around 2hrs to fix this

atul9911 avatar Jul 23 '20 20:07 atul9911

@atul9911, Did you upgrade your gradle version to fix this issue? If so, which gradle version did you use before? As far as I understand the issue is related to the usage of old gradle APIs. Thanks

eyalbe4 avatar Jul 24 '20 02:07 eyalbe4

All - I believe that upgrading the Gradle version used resolves this issue. The minimum supported Gradle as of today is 4.10.

eyalbe4 avatar Oct 22 '20 11:10 eyalbe4