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

Please publish to Gradle Plugin Repository #85

Open
chrisjenx opened this issue Aug 9, 2022 · 3 comments
Open

Please publish to Gradle Plugin Repository #85

chrisjenx opened this issue Aug 9, 2022 · 3 comments
Labels
enhancement New feature or request

Comments

@chrisjenx
Copy link

chrisjenx commented Aug 9, 2022

Feature description

Please publish to Gradle plugin repo so we can use id correctly. Or correct the plugin name so it can be resolved correctly: com.spotify.ruler:com.spotify.ruler:version

Thanks!

Reasoning

Work around:

settings.gradle.kts

pluginManagement {
    resolutionStrategy {
        eachPlugin {
            //https://github.com/spotify/ruler/issues/85
            if (requested.id.id == "com.spotify.ruler") {
                useModule("com.spotify.ruler:ruler-gradle-plugin:1.3.0")
            }
        }
    }
}
@chrisjenx chrisjenx added the enhancement New feature or request label Aug 9, 2022
@simonschiller
Copy link
Collaborator

Thanks for opening this issue! IIRC the reason why we didn't do this in the first place was that the Gradle plugin portal didn't allow us to publish artifacts in additon to the plugin (which we need to - see ruler-models). Maybe we didn't look hard enough or maybe this is possible now, do you know?

Another practical reason was that Spotify already has an account on Maven central and uses that for all OSS projects, so it was nice to keep everything in a central place (and using it from there is totally possible). Not sure if that's a strong reason, but we'd need to set up a corporate account for the plugin portal before we can publish it and I'm not sure how high of a priority this would have (since I'm no longer at Spotify - maybe @ViktorPetrovski or @botronic can check that if it's deemed important enough).

@chrisjenx
Copy link
Author

Another way to fix (Which is what we do internally) is correct the group and package name, for example we have internal plugins (obviously not published Gradle Repo).

Example:

create("lintPlugin") {
  id = "com.instacart.shopper.tooling.lint"
  //...
}

We set the groups to match the base id name:

allprojects {
    it.group = "com.instacart.shopper.tooling"

When you upload this it looks a bit weird but it means gradle can resolve this correctly:
image

Now in our main repo we can consume them correctly:

id("com.instacart.shopper.tooling.lint).version(...)

Hope that helps :)

@botronic
Copy link
Collaborator

botronic commented Sep 7, 2022

Hey @chrisjenx , thanks for bringing this up. Feel free to open a PR with your suggested changes and we will review it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants