Error: MissingMethodException: No signature of method applying "com.jfrog.artifactory"
Opened this issue · 0 comments
jtullgrenMedallia commented
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
- Create a gradle composite build of two java/kotlin projects, A and B, and a parent.
- Include build A in build B - Ensure projects compile fine
- Add
org.jfrog.buildinfo:build-info-extractor-gradle:4.31.4
as animplementation dependency
in build A build.gradle.kts. - Add the kotlin dsl as a plugin in build A build.gradle.kts
plugins {
`kotlin-dsl`
}
- 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")
}
- 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.