Skip to content
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

Update Kotlin Gradle Plugin to 1.8.20 #2972

Closed
wants to merge 2 commits into from

Conversation

IgnatBeresnev
Copy link
Member

@IgnatBeresnev IgnatBeresnev commented Apr 19, 2023

Based on #2968, it needs to be merged first, and then this branch rebased onto master

internal val jackson: JacksonTypeReference<T>
) {
companion object {
@PublishedApi
internal inline operator fun <reified T> invoke(): TypeReference<T> = TypeReference(jacksonTypeRef())
Copy link
Member Author

Choose a reason for hiding this comment

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

I think the rules for exposing internal declarations in inline functions have become more strict.

This is called in inline functions, so it needs to be @PublishedApi - not sure why it didn't before, seems logical.

And it used to call a private constructor, which is not allowed now, so the constructor needs to be both internal and annotated with @PublishedApi now

gradlePlugin-kotlin = "1.8.10"
gradlePlugin-android = "4.0.1"
gradlePlugin-kotlin = "1.8.20"
gradlePlugin-android = "4.1.3"
Copy link
Member Author

@IgnatBeresnev IgnatBeresnev Apr 21, 2023

Choose a reason for hiding this comment

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

If I remember correctly, KGP 1.8.20 now requires AGP to be >= 4.1.3. Could not build the project without bumping the version here.

@@ -26,6 +26,7 @@ class AndroidAutoConfigurationTest {
}

@Test
@Ignore // TODO fails because of a new source set androidTestRelease, which is not in the list
Copy link
Member Author

@IgnatBeresnev IgnatBeresnev Apr 21, 2023

Choose a reason for hiding this comment

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

This was reported in #2817. Need to figure out what to do with this source set.. Not even sure why it exists and how to handle it

@@ -103,7 +103,7 @@ class KotlinSignatureProvider(ctcc: CommentsToContentConverter, logger: DokkaLog
}

private fun <T : DClasslike> classlikeSignature(c: T): List<ContentNode> {
@Suppress("UNCHECKED_CAST")
@Suppress("UNCHECKED_CAST", "TYPE_MISMATCH_WARNING_FOR_INCORRECT_CAPTURE_APPROXIMATION")
Copy link
Member Author

@IgnatBeresnev IgnatBeresnev Apr 21, 2023

Choose a reason for hiding this comment

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

More info on TYPE_MISMATCH_WARNING_FOR_INCORRECT_CAPTURE_APPROXIMATION: KT-49404

This will be reported as error in 2.0, so we need to fix it either now or in 1.9. And I'm not sure if fixing it would result in breaking API changes. If so, it's quite sad as this is a frequently used function, and in this case I think we'd better do it sooner than later, because 1.9.0 will have enough compatibility problems as it is

So we need to fix the warning for the get() operator override, and then remove all existing TYPE_MISMATCH_WARNING_FOR_INCORRECT_CAPTURE_APPROXIMATION suppresses in this PR

@vmishenev vmishenev mentioned this pull request May 4, 2023
@IgnatBeresnev IgnatBeresnev deleted the update-kt-1.8.20 branch May 9, 2023 17:44
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.

1 participant