-
Notifications
You must be signed in to change notification settings - Fork 50
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
Do not publish Gradle module metadata #127
Conversation
Currently, this would produce a module metadata file which can't be consumed by downstream projects, since it doesn't contain any dependencies and only the hpi variant and not jar variant. Until this is fixed, Gradle module metadata shouldn't be published.
6bb39fd
to
eb8c086
Compare
This looks good @wolfs! Would you mind getting the codenarc task back to passing and I’ll get this merged/released? |
Using task abbreviation, the line length is now shorter than 120 characters. I wonder if it would be better to allow longer lines for tests...
I also suggest to relax this rule. The change currently implemented due to it (the abbreviated task name) just makes it worse. |
This has been released as v0.36.2 today. Thanks for this change @wolfs, and the link to the additional context.
I agree, and I'm open to that change. So far I haven't changed any of the static analysis settings because I'd like this plugin to (eventually) be implemented in Kotlin. I think Kotlin would simplify maintenance and give contributors more confidence when submitting changes.
Supporting module metadata would be good. If we also had a way to create module metadata for existing plugins, it may help simplify the way we currently resolve/add dependencies to a project. What's the best way to fix this? This use-case doesn't seem to fit the scenarios covered in Modeling feature variants and optional dependencies. I've also seen Working with Variant Attributes, but I'm unsure how I'd implement this (a new |
I created #129 for relaxing the code style rules. |
I wonder if plain Java wouldn't work good enough as well. Most of Gradle's own plugins are implemented in Java. |
@jjohannes, could you describe your thoughts how to publish correct Gradle module metadata for Jenkins plugins? |
It's possible, but one of the things I really appreciate about Gradle are the docs with high-quality examples. Since those examples generally aren't available in Java, I think that'd be a little less friendly than Kotlin. |
Currently, this would produce a module metadata file which can't be
consumed by downstream projects, since it doesn't contain any
dependencies and only the hpi variant and not jar variant.
Until this is fixed, Gradle module metadata shouldn't be published.
I realized this when publishing version 1.36 of the Jenkins
gradle-plugin
: jenkinsci/gradle-plugin#94 (comment).