Yep, currently, it behaves worthy. To recap:
• hopefully, it will work just of the box when
KT-42605 will be done
• before Gradle 6: it should just work
• for Gradle 6+: script configuration now imported during project import, but some scripts not yet supported:
https://github.com/gradle/gradle/issues/12640. This is already partially solved by
@Vampire contribution. Meanwhile, you need to import project first and then click to “Add to standalone scripts” inside notification at the top of the editor
• In Kotlin 1.4.20 (that is not yet even in EAP) you can add this script to standalone in settings “Preferences | Languages & Frameworks | Kotlin | Kotlin Scripting”