You're right that I didn't define kotlinx.html.version. I just copied and pasted that from the getting started page of the github repo, expecting it to work. 😂
What I've ended up doing is defining the version number right there rather than use a variable.