Adam S
06/08/2022, 3:04 PMbuild.gradle.kts
files using multiline strings, and I'd like to use IntelliJ Language Injection so it looks pretty.
I've set @Language("kotlin")
, however, IntelliJ doesn't like it and shows an error. Is there a way of telling the language injection to highlight a string as if it were a .gradle.kts
file?
fun File.`build gradle kts`(@Language("kotlin") contents: String): File =
createFile("build.gradle.kts", contents)
Chris Lee
06/08/2022, 4:23 PMplugins
is - rightfully so, cuz that is provided by Gradle. Perhaps there is a Language that is specific to Gradle Kotlin DSL build scripts? (not familiar with this aspect of IntelliJ)Adam S
06/08/2022, 5:22 PMChris Lee
06/08/2022, 5:28 PMAdam S
06/08/2022, 5:44 PMAdam S
09/10/2022, 10:54 AM@Language("kts")
gets the result I want 👍