what would be the right place to post about kotlin...
# announcements
j
what would be the right place to post about kotlinx.html (JVM version) ?
d
Here is fine.
Depends on what about it you want to post.
j
just want to know what imports i need to make the following work:
Copy code
div {

}
my gradle import is the following:
Copy code
compile(group = "org.jetbrains.kotlinx", name = "kotlin-html-jvm", version = "0.6.10")
d
Hmm, are you using IntelliJ?
j
that version also seems very old
yes, i am, intellij imports something else though, doesn't give an option for kotlinx.html .... div
d
Latest version is
0.6.12
.
I don't think you can use
div
by itself.
You need to call it inside another builder.
j
ok, that makes sense what kinda builder do i need for this ?
d
Copy code
createHTML().div {
     
}
or
Copy code
buildString {
    appendHTML(false).div {

    }
}
j
createHtml / createHTML doesn't seem to be an option when autocompleting, buildString is there though!
buildString is from kotlin.text, is that correct ?
d
yes
j
Copy code
buildString {
			appendHTML(false) {
				div {

				}
			}
		}
only options on autocompelte for appendHTML is create Extension function
j
i think gradle is the issue here, that import with both 1.6.10 and 1.6.12 doesn't seem to import i do have jcenter and mavenCentral as repos
Copy code
repositories {
	jcenter()
	mavenCentral()
	maven("<http://repo.jvaas.io>")
}
there's one listed under
Copy code
<http://repo.spring.io/libs-release/>
d
Try adding,
maven("<https://dl.bintray.com/kotlin/kotlinx.html>")
.
🖖 1
💪 1
j
got the import working, thanks for that was missing an x
Copy code
compile(group = "org.jetbrains.kotlinx", name = "kotlinx-html-jvm", version = "0.6.12")
had kotlin-html-jvm
👍🏼 1