This no longer works in Kotlin 2.2 ```rootProject....
# javascript
g
This no longer works in Kotlin 2.2
Copy code
rootProject.the<org.jetbrains.kotlin.gradle.targets.js.yarn.YarnRootExtension>().download = false
The error is
Copy code
Using 'download: Boolean' is an error. This property has been migrated to support the Provider API. Use corresponding spec (extension with name *Spec) instead.
Can someone help me figure out what the Spec equivalent is? I’m having trouble finding it.
t
.downloadProperty = false
?
In plugins:
Copy code
.downloadProperty.set(false)
d
The extension classes changed. Now they are
YarnRootEnvSpec
and
NodeJsEnvSpec
. So you should do:
Copy code
rootProject.plugins.withType<YarnPlugin> {
        rootProject.the<YarnRootEnvSpec>().download = false
    }
    rootProject.plugins.withType<NodeJsRootPlugin> {
        rootProject.the<NodeJsEnvSpec>().download = false
    }
1
thank you color 1