with kotlin 1.3.41 and serialization 0.11.1 gradle...
# serialization
t
with kotlin 1.3.41 and serialization 0.11.1 gradle says that it can't find kotlinx . any idea whats going wrong?
as far as i can see the depencies themselfs are correct. i can find the kotlinx-serialization jar in the gradle cache and using intellij and the "External Libraries" i can navigate to the serializations stuff, too
and its the same with kotlin 1.3.40
1.3.41/0.11.0 works, too
(beside some bad bytecode it generates 😞 )
f
I would try restart/invalidate caches
t
i did - without luck
v
Did you make any changes in settings.gradle?
☝️ 1
t
no
i mean, i often made changes to that file but not after changing the version vom 0.11.0 to 0.11.1
v
So you have something like this:
Copy code
pluginManagement {
    resolutionStrategy {
        eachPlugin {
            if (requested.id.id == "org.jetbrains.kotlin.jvm") {
                useModule("org.jetbrains.kotlin:kotlin-gradle-plugin:${requested.version}")
            }
            if (requested.id.id == "kotlinx-serialization") {
                useModule("org.jetbrains.kotlin:kotlin-serialization:${requested.version}")
            }
        }
    }
}
enableFeaturePreview("GRADLE_METADATA")
in settings.gradle
t
i have a resolution strategy for kotlinx serialization plugin but disable GRADLE_METADATA
v
Is it Multiplatform, Android or JVM?
t
it's multiplatform
j
you need GRADLE_METADATA you will see errors as described
t
since when? That's really bad
i have plugins in use that cannot work with GRADLE_METADATA enabled and i cannot upgrade to replace them. great 😞
l
Gradle metadata consumption (not publication) is enabled by default since Gradle 5.3
t
and i disabled it 😉
the question here is: since when does kotlinx.serialization needs this feature. the answer seems to be since 0.11.1 and its mentioned nowhere - i think thats bad
l
How did you disable it?
t
it's simply not enabled in settings.gradle. i dont know what is enabled or disabled by default, but not commenting out
enableFeaturePreview('GRADLE_METADATA')
makes a plugin fail
l
What Gradle version are you using?
t
5.4
l
Then gradle metadata consumption is enabled.
t
if that is true, why does the other plgin fail if and only if i write
enableFeaturePreview('GRADLE_METADATA')
into the settings.gradle? And why doesnt work kotlinx.serialization 0.11.1 for me?
l
Because it enables metadata publication. Also, I don't know anything about that plugin, nor the failure.