[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:
Alexander Likhachev
2021-07-10 13:09:54 +03:00
parent 922aad6865
commit f986591ba9

View File

@@ -126,7 +126,7 @@ fun URI.maybeRedirect(): URI {
fun RepositoryHandler.redirect() = configureEach {
when (this) {
is MavenArtifactRepository -> url = url.maybeRedirect()
is IvyArtifactRepository -> if (url != null) {
is IvyArtifactRepository -> @Suppress("SENSELESS_COMPARISON") if (url != null) {
url = url.maybeRedirect()
}
}
@@ -196,7 +196,7 @@ val checkRepositories: TaskProvider<Task> = tasks.register("checkRepositories")
}
project.repositories.filterIsInstance<IvyArtifactRepository>().forEach {
if (it.url == null) {
@Suppress("SENSELESS_COMPARISON") if (it.url == null) {
logInvalidIvyRepo(testName)
}
}