You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In gradle-scalafmt, we started using withMavenRepositories method when configuring Scalafmt. Unfortunately, the build then sometimes (esp. in clean environment, without anything cached) fails with following error:
Caused by: java.lang.NullPointerException: Username must not be null!
at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:910)
at org.gradle.internal.resource.transport.http.ntlm.NTLMCredentials.<init>(NTLMCredentials.java:36)
at org.gradle.internal.resource.transport.http.HttpClientConfigurer.useCredentials(HttpClientConfigurer.java:197)
at org.gradle.internal.resource.transport.http.HttpClientConfigurer.configureCredentials(HttpClientConfigurer.java:139)
at org.gradle.internal.resource.transport.http.HttpClientConfigurer.configure(HttpClientConfigurer.java:109)
at org.gradle.internal.resource.transport.http.HttpClientHelper.getClient(HttpClientHelper.java:195)
Also a user of gradle-scalafmtreported this as an issue.
It seems that this happens only if scalafmt is executed before scalaCompile. If scalaCompile goes first then it correctly download all dependencies (to the cache) and scalafmt goes well then as well.
Maybe it is a bug in coursier that is used under the hood?
The text was updated successfully, but these errors were encountered:
Sorry for bothering you with this. It seems that it was a strange error in gradle-scalafmt. I don't know why but this change to make the code more Groovish apparently fixed the issue.
In
gradle-scalafmt
, we started usingwithMavenRepositories
method when configuringScalafmt
. Unfortunately, the build then sometimes (esp. in clean environment, without anything cached) fails with following error:Also a user of
gradle-scalafmt
reported this as an issue.It seems that this happens only if
scalafmt
is executed beforescalaCompile
. IfscalaCompile
goes first then it correctly download all dependencies (to the cache) andscalafmt
goes well then as well.Maybe it is a bug in coursier that is used under the hood?
The text was updated successfully, but these errors were encountered: