Open eskatos opened 6 years ago
This issue has been automatically marked as stale because it has not had recent activity. Given the limited bandwidth of the team, it will be automatically closed if no further activity occurs. If you're interested in how we try to keep the backlog in a healthy state, please read our blog post on how we refine our backlog. If you feel this is something you could contribute, please have a look at our Contributor Guide. Thank you for your contribution.
Could you share a reproducer / detailed instructions on how this affects users?
Confirmed it is still the case with Gradle 8.3 with both Groovy and Kotlin DSLs.
As for a reproducer, simply try to use PasswordCredentials
where org.gradle.api.credentials.PasswordCredentials
is expected:
repositories {
maven {
credentials(PasswordCredentials) { // HERE
}
}
}
Script compilation will fail. The IDE will show red squiggles and is of no help, it doesn't suggest importing the other type with the same name.
On the positive side, when you actually write PasswordCre..
the IDE suggests both imports.
The workaround is to import the right type.
Thank you for providing a valid report.
The issue is in the backlog of the relevant team, but the existence of a workaround makes it non-critical, so it might take a while before a fix is made.
@JLLeitschuh commented on Fri Aug 10 2018
I'm not sure that it's intentional, but
org.gradle.api.artifacts.repositories.PasswordCredentials
is automatically imported instead oforg.gradle.api.credentials.PasswordCredentials
.I don't think either need to be automatically imported, but if one were to be automatically imported, it would make more sense to import
org.gradle.api.credentials.PasswordCredentials
as it's the base type.@eskatos commented on Thu Aug 16 2018
The Kotlin DSL takes implicit imports from a Gradle core internal service. @JLLeitschuh could you please check it's the same in Groovy scripts and report in
gradle/gradle
?@JLLeitschuh commented on Thu Aug 16 2018
@eskatos It is the same in the groovy scripts.
If you jump to declaration in IntelliJ for this you go to the
org.gradle.api.artifacts.repositories.PasswordCredentials
.@eskatos Do you just want to move this issue for me with ZenHub?