The recent Gradle Enterprise -> Develocity plug...
# develocity
ł
The recent Gradle Enterprise -> Develocity plugin migration is a bit cumbersome. First the default behavior is now to always send the build scan, so instead of an opt-in with
--scan
it's now an opt-out via
--no-scan
or
publishing { onlyIf { false } }
to get back to the old behavior. Not a big deal, but there's no mention of that anywhere in the release notes, so we upgraded a bunch of repos only to have to go and adjust all the scripts to the old behavior. Then there's 3.17.1 version which allows muting obscure deprecation warnings, apparently from transitive dependencies (why would they pull GE, I don't know). But the release notes say
[NEW] Support muting Gradle Enterprise deprecation warnings coming from transitive dependencies
, but how do I do that?
p
Hi Łukasz, you can find answers to your questions in the migration guide linked in the plugin user manual (search for "Migrating to the Develocity plugin"): 1. Change to the publication behavior: https://docs.gradle.com/enterprise/gradle-plugin/legacy/#updated_build_scan_publication_behavior 2. How to mute warnings is described in this section. Search for
muteWarnings
. You may want to use it if your convention plugins still access GE APIs and you have no control over updating them. One example of such plugin is Common Custom User Data plugin. Where would you like to have this data to make it more easy to discover?
ł
Ohhh I see.
Where would you like to have this data to make it more easy to discover?
In the
release history
section, in a non-washed-out font, preferably emphasized to say
if you're updating from Gradle Enterprise xxx, see migration guide HERE
. I already had build scans configured and when the release popped up, I went directly to the changelog and not read the whole docs about setting up the plugin again. I don't remember but there's a good chance I even went to https://plugins.gradle.org/plugin/com.gradle.develocity, which also has a changelog but no mention of a migration guide. Finally I got to the docs eventually, but the note on top is gray-on-white, so I skimmed it and only registered that the old plugin is deprecated — which I knew already. I completely missed the link to migration guide there
Thanks for the help 🙇 The migration guide you linked is indeed helpful
p
No worries; I am happy to help. I'll see how we can link the migration guide from the release notes to the plugin manual. Thank you for your feedback.
j
The
publishOnFailure()
shortcut being gone is a bit sad, i replaced it with
publishing { onlyIf { false } }
since I didn't care that much, but
publishing { onlyIf { it.buildResult.failures.empty } }
is a rather lackluster alternative