Skip to content
This repository has been archived by the owner on Aug 10, 2024. It is now read-only.

Commit

Permalink
add kotlin-reflect
Browse files Browse the repository at this point in the history
  • Loading branch information
sanity committed Mar 5, 2017
1 parent f86836c commit de81909
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 13 deletions.
3 changes: 2 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
group 'com.github.sanity'
version '0.0.30'
version '0.0.31'

buildscript {
ext.kotlin_version = '1.1.0'
Expand Down Expand Up @@ -67,6 +67,7 @@ dependencies {
compile group: 'commons-io', name: 'commons-io', version: '2.5'

compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
compile 'org.jetbrains.kotlinx:kotlinx-coroutines-core:0.12'
compile 'org.jetbrains.kotlinx:kotlinx-coroutines-jdk8:0.12'

Expand Down
14 changes: 2 additions & 12 deletions src/main/kotlin/com/github/sanity/kweb/samples/helloWorld.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,14 @@ package com.github.sanity.kweb.samples

import com.github.sanity.kweb.KWeb
import com.github.sanity.kweb.dom.element.creation.h1
import com.github.sanity.kweb.dom.element.events.on
import com.github.sanity.kweb.dom.element.modification.setText

/**
* Created by ian on 3/3/17.
*/

// [START HW]
fun main(args: Array<String>) {
KWeb(port = 7823) {
var counter = 0
val h1 = doc.body.h1()
h1.setText("Hello World!")

h1.on.click {
h1.setText(counter.toString())
counter++
}
doc.body.h1().setText("Hello World!")
}
}
// [END HW]
}

0 comments on commit de81909

Please sign in to comment.