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

Gradle Artifactory plugin doesn't work with gradle plugins #637

Open
Sineaggi opened this issue Apr 6, 2022 · 2 comments
Open

Gradle Artifactory plugin doesn't work with gradle plugins #637

Sineaggi opened this issue Apr 6, 2022 · 2 comments
Labels
gradle bug Create a report to help us improve

Comments

@Sineaggi
Copy link
Contributor

Sineaggi commented Apr 6, 2022

Describe the bug
There's not simple way to get the artifactory plugin to publish gradle plugins

To Reproduce
Steps to reproduce the behavior

plugins {
    `java-gradle-plugin`
    id "com.jfrog.artifactory" version "4.28.0"
}

gradlePlugin {
    plugins {
        register("example") {
            id = "com.example"
            implementationClass = "com.example.ExamplePlugin"
        }
    }
}

Expected behavior
Running ./gradlew artifactoryPublish` should publish the gradle jar and plugin markers

Screenshots
If applicable, add screenshots to help explain your problem.

Versions

  • Gradle Artifactory plugin version: 4.28.0
  • Operating system: Linux
  • Artifactory Version: 7.25.7

Additional context
NA

@Sineaggi Sineaggi added the gradle bug Create a report to help us improve label Apr 6, 2022
@Sineaggi
Copy link
Contributor Author

Sineaggi commented Apr 6, 2022

The only way we've gotten publishing to work is to add all publications manually

afterEvaluate {
    tasks.named<org.jfrog.gradle.plugin.artifactory.task.ArtifactoryTask>("artifactoryPublish") {
        publications(*(publishing.publications.toTypedArray()))
    }
}

@rkrisztian
Copy link

rkrisztian commented Mar 19, 2024

This is important to me too, as Gradle authors already attempted to deprecate project.afterEvaluate (see https://docs.gradle.org/6.3/userguide/upgrading_version_5.html#calling_project_afterevaluate_on_an_evaluated_project_has_been_deprecated), which, with an ideal Artifactory plugin design, the following code shouldn't need to use:

afterEvaluate {
	tasks.named('artifactoryPublish', ArtifactoryTask) {
		publications 'ALL_PUBLICATIONS'
	}
}

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

2 participants