You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Specifying the dependency in a root-level build.gradle.kts with a version directly or via version catalog and not applying it but instead opting to apply it inside build-logic convention plugin produces the following error log
* Where:
Precompiled script plugin '***/build-logic/src/main/kotlin/artifactory-publishing.gradle.kts' line: 1
* What went wrong:
Plugin [id: 'com.jfrog.artifactory'] was not found in any of the following sources:
- Gradle Core Plugins (plugin is not in 'org.gradle' namespace)
- Plugin Repositories (plugin dependency must include a version number for this source)
Current behavior
Unable to apply com.jfrog.artifactory plugin to lift out the publishing logic into a convention plugin
Reproduction steps
No response
Expected behavior
Being able to set up publishing from a convention plugin inside an included build
Artifactory Gradle plugin version
5.1.13 or any
Operating system type and version
MacOS
JFrog Artifactory version
No response
Gradle version
8.2.0
The text was updated successfully, but these errors were encountered:
@maksym-moroz
Appreciate you flagging this problem!
Could you please share a basic reproducer project? Just a small GitHub project that we can fork to replicate the issue.
Thanks!
For those interested in extracting jfrog-artifactory setup into a precompiled convention plugin, here is the quick guide.
To apply jfrog-artifactory inside your convention plugin you first need to satisfy the dependency on it inside build.gradle.kts for your included build
This is where I faced the problem since applying a plugin via implementation is not allowed. Here is the Gradle spec for addressing this problem, however it's not done yet but there is a workaround described, copying it here in case the link dies:
It is currently not possible to use the plugin id (and version) or the version catalog for dependency declaration, which means the required coordinates have to be known or be derived somehow. The steps to retrieve the coordinates are manual and cumbersome: One has to lookup the plugin on the Plugin Portal, find the coordinates in the legacy snippet at the bottom and copy them from there.
For jfrog-artifactory legacy path is org.jfrog.buildinfo:build-info-extractor-gradle
Adding this as a library to the version catalog and then referring to it from build.gradle.kts dependencies block allows you to add id("com.jfrog.artifactory") to your precompiled convention plugin.
For some reason using artifactory {} block is not possible as it keeps getting unrecognised after getting generated.
For those wondering how to configure it in case you face the same issue, extension is called ArtifactoryPluginConvention, i.e. configure<ArtifactoryPluginConvention> {...}
Describe the bug
Specifying the dependency in a root-level
build.gradle.kts
with a version directly or via version catalog and not applying it but instead opting to apply it inside build-logic convention plugin produces the following error logCurrent behavior
Unable to apply
com.jfrog.artifactory
plugin to lift out the publishing logic into a convention pluginReproduction steps
No response
Expected behavior
Being able to set up publishing from a convention plugin inside an included build
Artifactory Gradle plugin version
5.1.13 or any
Operating system type and version
MacOS
JFrog Artifactory version
No response
Gradle version
8.2.0
The text was updated successfully, but these errors were encountered: