mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-03-10 08:31:29 +00:00
[Build] Suppress ivy url senseless comparison warning
It's marked as not null in Gradle, but it's still possible to declare Ivy repository with null url which leads to GeneralKotlin2JsGradlePluginIT#testJsBothModeWithTests test false fail (cache redirector script is used in Gradle integration tests)
This commit is contained in:
@@ -126,7 +126,7 @@ fun URI.maybeRedirect(): URI {
|
|||||||
fun RepositoryHandler.redirect() = configureEach {
|
fun RepositoryHandler.redirect() = configureEach {
|
||||||
when (this) {
|
when (this) {
|
||||||
is MavenArtifactRepository -> url = url.maybeRedirect()
|
is MavenArtifactRepository -> url = url.maybeRedirect()
|
||||||
is IvyArtifactRepository -> if (url != null) {
|
is IvyArtifactRepository -> @Suppress("SENSELESS_COMPARISON") if (url != null) {
|
||||||
url = url.maybeRedirect()
|
url = url.maybeRedirect()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -196,7 +196,7 @@ val checkRepositories: TaskProvider<Task> = tasks.register("checkRepositories")
|
|||||||
}
|
}
|
||||||
|
|
||||||
project.repositories.filterIsInstance<IvyArtifactRepository>().forEach {
|
project.repositories.filterIsInstance<IvyArtifactRepository>().forEach {
|
||||||
if (it.url == null) {
|
@Suppress("SENSELESS_COMPARISON") if (it.url == null) {
|
||||||
logInvalidIvyRepo(testName)
|
logInvalidIvyRepo(testName)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user