Resolving dependecny configuration 'archieves; is not allowed as it is defined as 'canBeResolved=false'

Could not determine the dependencies for task ‘:artifactoryPublish’

quick googling says add maven-publish plugin, i added still issue not resolved. i even bumped jfrog version too.

Still issue not resolvoing

pluginManager.withPlugin('com.jfrog.artifactory') {
    artifactory {
        publish {
            defaults {
                publishConfigs('archives', 'published')
            }
        }
    }

this is perfectly working in gradle 7.5 but not working in gradle 8 and throwing above error

You should probably have a look at the documentation of that plugin. From a quick look I guess you should indeed apply the maven-publish plugin, but that’s not all. You should then also properly declare a publication and use publications("ALL_PUBLICATIONS") instead of your publishConfigs line or something like that.

For more help you should probably ask in a support channel of that plugin instead.