Since some time, on any maven { url "whatever" } I'm getting this warning:

Here a sample project experiencing the issue
It's not critical neither a blocker, but it's kind of annoying
Does anybody know where it comes from?
Specs:
To make IntelliJ IDEA stop complaining, you can use:
maven {
url = 'http://myrepo'
}
which I believe is the Groovy shortcut for setUrl('http://myrepo').
Your IDE is analyzing the Gradle DSL. With fully expanded syntax, your code looks like this:
project.dependencies({(RepositoryHandler handler) -> {
handler.maven({(MavenArtifactRepository repository) -> {
repository.setUrl("https://...");
});
};
If you look in the Gradle API, you can see that MavenArtifactRepository has two methods:
void setUrl(Object url)
void setUrl(URI url)
So the IDE is saying you should pass Object or an URI. If you use setUri(...) the annoying IDE warning should go away.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With