Skip to content

Fix deprecation warnings and enable warningsAsErrors for buildSrc #4464

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

ALikhachev
Copy link
Member

K/JS related deprecation warnings are to be promoted to error within KT-68597 in Kotlin 2.2

@ALikhachev ALikhachev requested a review from dkhalanskyjb June 20, 2025 12:33
@ALikhachev ALikhachev force-pushed the ALikhachev/buildSrc-deprecation-warnings branch from 67f3371 to 8c3070a Compare June 20, 2025 12:34
K/JS related deprecation warnings are to be promoted to error within KT-68597 in Kotlin 2.2
@ALikhachev ALikhachev force-pushed the ALikhachev/buildSrc-deprecation-warnings branch from 8c3070a to dc6d37b Compare June 20, 2025 12:42
Comment on lines +108 to +112
val currentValue = downloadBaseUrl.orNull
if (currentValue != null) {
downloadBaseUrl = CacheRedirector.maybeRedirect(currentValue)
}
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this not be written like it was before? That is,

Suggested change
val currentValue = downloadBaseUrl.orNull
if (currentValue != null) {
downloadBaseUrl = CacheRedirector.maybeRedirect(currentValue)
}
}
downloadBaseUrl.orNull?.let {
downloadBaseUrl = CacheRedirector.maybeRedirect(it)
}
}

I'd expect this to be a pure Kotlin construction, without any relation to what Gradle supports or doesn't support.

Copy link
Member Author

@ALikhachev ALikhachev Jun 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, it can be. If you prefer this style – I can update it. The comment above relates to the fact that orNull resolves the value of the property eagerly instead of applying a dynamic transformator on it

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I somewhat prefer the current style, but it's not important. I just got confused about what part of the change was important and which accidental.

Comment on lines +108 to +112
val currentValue = downloadBaseUrl.orNull
if (currentValue != null) {
downloadBaseUrl = CacheRedirector.maybeRedirect(currentValue)
}
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I somewhat prefer the current style, but it's not important. I just got confused about what part of the change was important and which accidental.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants