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

Error: MissingMethodException: No signature of method applying "com.jfrog.artifactory" #713

Open
jtullgrenMedallia opened this issue Feb 28, 2023 · 0 comments
Labels
gradle bug Create a report to help us improve

Comments

@jtullgrenMedallia
Copy link

jtullgrenMedallia commented Feb 28, 2023

Describe the bug
An error occurs when applying the gradle artifactory plugin to a precompiled script plugin:

Cannot cast object 'org.jfrog.gradle.plugin.artifactory.dsl.ArtifactoryPluginConvention@7f065b2c' with class 'org.jfrog.gradle.plugin.artifactory.dsl.ArtifactoryPluginConvention' to class 'org.jfrog.gradle.plugin.artifactory.dsl.ArtifactoryPluginConvention'```


Cause 1: groovy.lang.MissingMethodException: No signature of method: org.jfrog.gradle.plugin.artifactory.extractor.listener.ProjectsEvaluatedBuildListener$_afterEvaluate_closure1.doCall() is applicable for argument types: (org.jfrog.gradle.plugin.artifactory.task.ArtifactoryTask_Decorated) values: [task ':brand-sdk-project:brand-api-internal:artifactoryPublish']

To Reproduce

  1. Create a gradle composite build of two java/kotlin projects, A and B, and a parent.
  2. Include build A in build B - Ensure projects compile fine
  3. Add org.jfrog.buildinfo:build-info-extractor-gradle:4.31.4 as an implementation dependency in build A build.gradle.kts.
  4. Add the kotlin dsl as a plugin in build A build.gradle.kts
plugins {
    `kotlin-dsl`
}
  1. Add a kotlin precompiled script plugin file in which to add the jfrog plugin in build A: src/main/kotlin/example/example-convention.gradle.kts
// the contents of example-convention.gradle.kts
plugins {
    id("com.jfrog.artifactory")
    id("maven-publish")
}
  1. Check that both projects compile

Expected behavior
There should be no Error.

Screenshots
None as it is a build error.

Versions

  • Gradle Artifactory plugin version: 4.31.4
  • Operating system: OSX Monteray 12.6.1
  • Artifactory Version: Enterprise Plus 7.37.16 rev 73716900
  • Gradle Version: 7.5

Additional context
This is working for numerous other plugins, such as detekt, kotest, kotlin plugins, android, and built in gradle plugins.

@jtullgrenMedallia jtullgrenMedallia added the gradle bug Create a report to help us improve label Feb 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gradle bug Create a report to help us improve
Projects
None yet
Development

No branches or pull requests

1 participant