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

Commit de81909

Browse files
committed
add kotlin-reflect
1 parent f86836c commit de81909

File tree

2 files changed

+4
-13
lines changed

2 files changed

+4
-13
lines changed

build.gradle

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
group 'com.github.sanity'
2-
version '0.0.30'
2+
version '0.0.31'
33

44
buildscript {
55
ext.kotlin_version = '1.1.0'
@@ -67,6 +67,7 @@ dependencies {
6767
compile group: 'commons-io', name: 'commons-io', version: '2.5'
6868

6969
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
70+
compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
7071
compile 'org.jetbrains.kotlinx:kotlinx-coroutines-core:0.12'
7172
compile 'org.jetbrains.kotlinx:kotlinx-coroutines-jdk8:0.12'
7273

src/main/kotlin/com/github/sanity/kweb/samples/helloWorld.kt

+2-12
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,14 @@ package com.github.sanity.kweb.samples
22

33
import com.github.sanity.kweb.KWeb
44
import com.github.sanity.kweb.dom.element.creation.h1
5-
import com.github.sanity.kweb.dom.element.events.on
65
import com.github.sanity.kweb.dom.element.modification.setText
76

87
/**
98
* Created by ian on 3/3/17.
109
*/
1110

12-
// [START HW]
1311
fun main(args: Array<String>) {
1412
KWeb(port = 7823) {
15-
var counter = 0
16-
val h1 = doc.body.h1()
17-
h1.setText("Hello World!")
18-
19-
h1.on.click {
20-
h1.setText(counter.toString())
21-
counter++
22-
}
13+
doc.body.h1().setText("Hello World!")
2314
}
24-
}
25-
// [END HW]
15+
}

0 commit comments

Comments
 (0)