I publish a library which is intended to be used only in testing (e.g. like the AssertJ, though mine is not nearly as famous :))) And I want that my library is published with scope test, of course.
I probably can, but that’s no reason to be rude.
Pinging or DMing a person just because you think they could have an answer is rude in practically any open community out there, unless some written rules allow it, or you really want something personal from that person.
Also, the thread you posted to has nothing to do with what you posted, as the thread was about the scope in the POM of your library, so better use a new thread.
What you are asking to is not a Gradle question at all though.
You cannot influence what is displayed there, as it is not coming from your library.
The page mvnrepository.com knits this snippet and displays it.
If there is a way to influence that, I have no idea how.
You have to ask the folks at mvnrepository.com whether this can be influenced, but I doubt it.
A consumer of your library has the choice to which scope they add your library.
Sorry if that felt rude, it was none of my intentions. I have struggled with my question for a while, and you seemed to know this matter very well - that’s why I tagged you. My apologies for the disturbance. I appreciate that you separated my question into its own thread. Thanks!
Indeed, the “published scope” thing is not part of pom.xml; still, somehow mvnrepository.com shows JUnit and the likes with <scope>test</scope>. However, such addition is NOT displayed for the same library at Maven Central. Looks like you’re right - apparently mvnrepository.com manually tags them as “testing libraries”.
I find this matter important because of the high influence of mvnrepository.com. Essentially, it is “a google for artifacts”. Most developers just paste those snippets straight into their pom/Gradle files, thus risking adding to the production build a library intended for testing only! In the worst case it might bring a security vulnerability - something which I never want to incur to my users.
Unfortunately, there is no documentation or procedure at mvnrepository.com how to request to tag my library as “for testing”, at least not that I could find… Anyone has idea?