diff --git a/core-kotlin/.gradle/4.4/fileChanges/last-build.bin b/core-kotlin/.gradle/4.4/fileChanges/last-build.bin
new file mode 100644
index 0000000000..f76dd238ad
Binary files /dev/null and b/core-kotlin/.gradle/4.4/fileChanges/last-build.bin differ
diff --git a/core-kotlin/.gradle/4.4/fileContent/annotation-processors.bin b/core-kotlin/.gradle/4.4/fileContent/annotation-processors.bin
new file mode 100644
index 0000000000..114bb513f1
Binary files /dev/null and b/core-kotlin/.gradle/4.4/fileContent/annotation-processors.bin differ
diff --git a/core-kotlin/.gradle/4.4/fileContent/fileContent.lock b/core-kotlin/.gradle/4.4/fileContent/fileContent.lock
new file mode 100644
index 0000000000..7d3f01f31a
Binary files /dev/null and b/core-kotlin/.gradle/4.4/fileContent/fileContent.lock differ
diff --git a/core-kotlin/.gradle/4.4/fileHashes/fileHashes.bin b/core-kotlin/.gradle/4.4/fileHashes/fileHashes.bin
new file mode 100644
index 0000000000..8148ac5664
Binary files /dev/null and b/core-kotlin/.gradle/4.4/fileHashes/fileHashes.bin differ
diff --git a/core-kotlin/.gradle/4.4/fileHashes/fileHashes.lock b/core-kotlin/.gradle/4.4/fileHashes/fileHashes.lock
new file mode 100644
index 0000000000..d85e0adc69
Binary files /dev/null and b/core-kotlin/.gradle/4.4/fileHashes/fileHashes.lock differ
diff --git a/core-kotlin/.gradle/4.4/fileHashes/resourceHashesCache.bin b/core-kotlin/.gradle/4.4/fileHashes/resourceHashesCache.bin
new file mode 100644
index 0000000000..28dd081876
Binary files /dev/null and b/core-kotlin/.gradle/4.4/fileHashes/resourceHashesCache.bin differ
diff --git a/core-kotlin/.gradle/4.4/taskHistory/taskHistory.bin b/core-kotlin/.gradle/4.4/taskHistory/taskHistory.bin
new file mode 100644
index 0000000000..ecbab3d3dd
Binary files /dev/null and b/core-kotlin/.gradle/4.4/taskHistory/taskHistory.bin differ
diff --git a/core-kotlin/.gradle/4.4/taskHistory/taskHistory.lock b/core-kotlin/.gradle/4.4/taskHistory/taskHistory.lock
new file mode 100644
index 0000000000..6944d56748
Binary files /dev/null and b/core-kotlin/.gradle/4.4/taskHistory/taskHistory.lock differ
diff --git a/core-kotlin/.gradle/buildOutputCleanup/buildOutputCleanup.lock b/core-kotlin/.gradle/buildOutputCleanup/buildOutputCleanup.lock
new file mode 100644
index 0000000000..6a1ba3002a
Binary files /dev/null and b/core-kotlin/.gradle/buildOutputCleanup/buildOutputCleanup.lock differ
diff --git a/core-kotlin/.gradle/buildOutputCleanup/cache.properties b/core-kotlin/.gradle/buildOutputCleanup/cache.properties
new file mode 100644
index 0000000000..1cae56dfec
--- /dev/null
+++ b/core-kotlin/.gradle/buildOutputCleanup/cache.properties
@@ -0,0 +1,2 @@
+#Tue Jul 03 21:01:49 AEST 2018
+gradle.version=4.4
diff --git a/core-kotlin/.gradle/buildOutputCleanup/outputFiles.bin b/core-kotlin/.gradle/buildOutputCleanup/outputFiles.bin
new file mode 100644
index 0000000000..fdf5abf978
Binary files /dev/null and b/core-kotlin/.gradle/buildOutputCleanup/outputFiles.bin differ
diff --git a/core-kotlin/build.gradle b/core-kotlin/build.gradle
new file mode 100755
index 0000000000..6c1e06aa25
--- /dev/null
+++ b/core-kotlin/build.gradle
@@ -0,0 +1,57 @@
+
+
+group 'com.baeldung.ktor'
+version '1.0-SNAPSHOT'
+
+
+buildscript {
+ ext.kotlin_version = '1.2.41'
+ ext.ktor_version = '0.9.2'
+
+ repositories {
+ mavenCentral()
+ }
+ dependencies {
+
+ classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
+ }
+}
+
+apply plugin: 'java'
+apply plugin: 'kotlin'
+apply plugin: 'application'
+
+mainClassName = 'APIServer.kt'
+
+sourceCompatibility = 1.8
+compileKotlin { kotlinOptions.jvmTarget = "1.8" }
+compileTestKotlin { kotlinOptions.jvmTarget = "1.8" }
+
+kotlin { experimental { coroutines "enable" } }
+
+repositories {
+ mavenCentral()
+ jcenter()
+ maven { url "https://dl.bintray.com/kotlin/ktor" }
+}
+sourceSets {
+ main{
+ kotlin{
+ srcDirs 'com/baeldung/ktor'
+ }
+ }
+
+}
+
+dependencies {
+ compile "io.ktor:ktor-server-netty:$ktor_version"
+ compile "ch.qos.logback:logback-classic:1.2.1"
+ compile "io.ktor:ktor-gson:$ktor_version"
+ testCompile group: 'junit', name: 'junit', version: '4.12'
+ implementation 'com.beust:klaxon:3.0.1'
+
+}
+task runServer(type: JavaExec) {
+ main = 'APIServer'
+ classpath = sourceSets.main.runtimeClasspath
+}
\ No newline at end of file
diff --git a/core-kotlin/build/classes/kotlin/main/META-INF/KtorWithKotlin.kotlin_module b/core-kotlin/build/classes/kotlin/main/META-INF/KtorWithKotlin.kotlin_module
new file mode 100644
index 0000000000..8eb6d88b14
Binary files /dev/null and b/core-kotlin/build/classes/kotlin/main/META-INF/KtorWithKotlin.kotlin_module differ
diff --git a/core-kotlin/build/kotlin-build/version.txt b/core-kotlin/build/kotlin-build/version.txt
new file mode 100644
index 0000000000..01aabacbfd
--- /dev/null
+++ b/core-kotlin/build/kotlin-build/version.txt
@@ -0,0 +1 @@
+11001
\ No newline at end of file
diff --git a/core-kotlin/build/kotlin/compileKotlin/build-history.bin b/core-kotlin/build/kotlin/compileKotlin/build-history.bin
new file mode 100644
index 0000000000..e3926f1cea
Binary files /dev/null and b/core-kotlin/build/kotlin/compileKotlin/build-history.bin differ
diff --git a/core-kotlin/build/kotlin/compileKotlin/caches-jvm/inputs/source-to-output.tab b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/inputs/source-to-output.tab
new file mode 100644
index 0000000000..9a13eeb034
Binary files /dev/null and b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/inputs/source-to-output.tab differ
diff --git a/core-kotlin/build/kotlin/compileKotlin/caches-jvm/inputs/source-to-output.tab.keystream b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/inputs/source-to-output.tab.keystream
new file mode 100644
index 0000000000..64fb36c0cd
Binary files /dev/null and b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/inputs/source-to-output.tab.keystream differ
diff --git a/core-kotlin/build/kotlin/compileKotlin/caches-jvm/inputs/source-to-output.tab.keystream.len b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/inputs/source-to-output.tab.keystream.len
new file mode 100644
index 0000000000..a8a65c788a
Binary files /dev/null and b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/inputs/source-to-output.tab.keystream.len differ
diff --git a/core-kotlin/build/kotlin/compileKotlin/caches-jvm/inputs/source-to-output.tab.len b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/inputs/source-to-output.tab.len
new file mode 100644
index 0000000000..b3155f9573
Binary files /dev/null and b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/inputs/source-to-output.tab.len differ
diff --git a/core-kotlin/build/kotlin/compileKotlin/caches-jvm/inputs/source-to-output.tab.values.at b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/inputs/source-to-output.tab.values.at
new file mode 100644
index 0000000000..0283c67f2e
Binary files /dev/null and b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/inputs/source-to-output.tab.values.at differ
diff --git a/core-kotlin/build/kotlin/compileKotlin/caches-jvm/inputs/source-to-output.tab_i b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/inputs/source-to-output.tab_i
new file mode 100644
index 0000000000..d8b968522f
Binary files /dev/null and b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/inputs/source-to-output.tab_i differ
diff --git a/core-kotlin/build/kotlin/compileKotlin/caches-jvm/inputs/source-to-output.tab_i.len b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/inputs/source-to-output.tab_i.len
new file mode 100644
index 0000000000..131e265740
Binary files /dev/null and b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/inputs/source-to-output.tab_i.len differ
diff --git a/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab
new file mode 100644
index 0000000000..ee833bf385
Binary files /dev/null and b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab differ
diff --git a/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream
new file mode 100644
index 0000000000..e64763e364
Binary files /dev/null and b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream differ
diff --git a/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream.len b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream.len
new file mode 100644
index 0000000000..6f363fac0d
Binary files /dev/null and b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream.len differ
diff --git a/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.len b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.len
new file mode 100644
index 0000000000..de21465095
Binary files /dev/null and b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.len differ
diff --git a/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.values.at b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.values.at
new file mode 100644
index 0000000000..69ca11942a
Binary files /dev/null and b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.values.at differ
diff --git a/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i
new file mode 100644
index 0000000000..56bab89b95
Binary files /dev/null and b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i differ
diff --git a/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i.len b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i.len
new file mode 100644
index 0000000000..131e265740
Binary files /dev/null and b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i.len differ
diff --git a/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/constants.tab b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/constants.tab
new file mode 100644
index 0000000000..ff97d1b01f
Binary files /dev/null and b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/constants.tab differ
diff --git a/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/constants.tab.keystream b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/constants.tab.keystream
new file mode 100644
index 0000000000..15a48aaac3
Binary files /dev/null and b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/constants.tab.keystream differ
diff --git a/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/constants.tab.keystream.len b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/constants.tab.keystream.len
new file mode 100644
index 0000000000..8c81f1d558
Binary files /dev/null and b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/constants.tab.keystream.len differ
diff --git a/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/constants.tab.len b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/constants.tab.len
new file mode 100644
index 0000000000..60e2d8aa9e
Binary files /dev/null and b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/constants.tab.len differ
diff --git a/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/constants.tab.values.at b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/constants.tab.values.at
new file mode 100644
index 0000000000..28d57f697c
Binary files /dev/null and b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/constants.tab.values.at differ
diff --git a/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/constants.tab_i b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/constants.tab_i
new file mode 100644
index 0000000000..c83b7e0840
Binary files /dev/null and b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/constants.tab_i differ
diff --git a/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/constants.tab_i.len b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/constants.tab_i.len
new file mode 100644
index 0000000000..131e265740
Binary files /dev/null and b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/constants.tab_i.len differ
diff --git a/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab
new file mode 100644
index 0000000000..e963a311ef
Binary files /dev/null and b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab differ
diff --git a/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream
new file mode 100644
index 0000000000..405d891a7d
Binary files /dev/null and b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream differ
diff --git a/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream.len b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream.len
new file mode 100644
index 0000000000..d43f4d11d9
Binary files /dev/null and b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream.len differ
diff --git a/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab.len b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab.len
new file mode 100644
index 0000000000..46eb98bf02
Binary files /dev/null and b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab.len differ
diff --git a/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab.values.at b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab.values.at
new file mode 100644
index 0000000000..4cf18df7d3
Binary files /dev/null and b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab.values.at differ
diff --git a/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i
new file mode 100644
index 0000000000..7cdb437e67
Binary files /dev/null and b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i differ
diff --git a/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i.len b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i.len
new file mode 100644
index 0000000000..131e265740
Binary files /dev/null and b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i.len differ
diff --git a/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/package-parts.tab b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/package-parts.tab
new file mode 100644
index 0000000000..bd386a4d33
Binary files /dev/null and b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/package-parts.tab differ
diff --git a/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/package-parts.tab.keystream b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/package-parts.tab.keystream
new file mode 100644
index 0000000000..9c2728d424
Binary files /dev/null and b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/package-parts.tab.keystream differ
diff --git a/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/package-parts.tab.keystream.len b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/package-parts.tab.keystream.len
new file mode 100644
index 0000000000..f4c8cfc8ce
Binary files /dev/null and b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/package-parts.tab.keystream.len differ
diff --git a/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/package-parts.tab.len b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/package-parts.tab.len
new file mode 100644
index 0000000000..ae49419733
Binary files /dev/null and b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/package-parts.tab.len differ
diff --git a/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/package-parts.tab.values.at b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/package-parts.tab.values.at
new file mode 100644
index 0000000000..e83bb4460f
Binary files /dev/null and b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/package-parts.tab.values.at differ
diff --git a/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/package-parts.tab_i b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/package-parts.tab_i
new file mode 100644
index 0000000000..49628173ca
Binary files /dev/null and b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/package-parts.tab_i differ
diff --git a/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/package-parts.tab_i.len b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/package-parts.tab_i.len
new file mode 100644
index 0000000000..131e265740
Binary files /dev/null and b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/package-parts.tab_i.len differ
diff --git a/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/proto.tab b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/proto.tab
new file mode 100644
index 0000000000..1a87ab2470
Binary files /dev/null and b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/proto.tab differ
diff --git a/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/proto.tab.keystream b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/proto.tab.keystream
new file mode 100644
index 0000000000..a3b2539066
Binary files /dev/null and b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/proto.tab.keystream differ
diff --git a/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/proto.tab.keystream.len b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/proto.tab.keystream.len
new file mode 100644
index 0000000000..ae4d3fca10
Binary files /dev/null and b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/proto.tab.keystream.len differ
diff --git a/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/proto.tab.len b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/proto.tab.len
new file mode 100644
index 0000000000..75a15fe067
Binary files /dev/null and b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/proto.tab.len differ
diff --git a/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/proto.tab.values.at b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/proto.tab.values.at
new file mode 100644
index 0000000000..7b1138afa8
Binary files /dev/null and b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/proto.tab.values.at differ
diff --git a/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/proto.tab_i b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/proto.tab_i
new file mode 100644
index 0000000000..8a98cc2dd0
Binary files /dev/null and b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/proto.tab_i differ
diff --git a/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/proto.tab_i.len b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/proto.tab_i.len
new file mode 100644
index 0000000000..131e265740
Binary files /dev/null and b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/proto.tab_i.len differ
diff --git a/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/source-to-classes.tab b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/source-to-classes.tab
new file mode 100644
index 0000000000..f210521b3f
Binary files /dev/null and b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/source-to-classes.tab differ
diff --git a/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream
new file mode 100644
index 0000000000..6e9870be29
Binary files /dev/null and b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream differ
diff --git a/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream.len b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream.len
new file mode 100644
index 0000000000..a8a65c788a
Binary files /dev/null and b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream.len differ
diff --git a/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/source-to-classes.tab.len b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/source-to-classes.tab.len
new file mode 100644
index 0000000000..b3155f9573
Binary files /dev/null and b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/source-to-classes.tab.len differ
diff --git a/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/source-to-classes.tab.values.at b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/source-to-classes.tab.values.at
new file mode 100644
index 0000000000..02ca88b516
Binary files /dev/null and b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/source-to-classes.tab.values.at differ
diff --git a/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/source-to-classes.tab_i b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/source-to-classes.tab_i
new file mode 100644
index 0000000000..95521d2cc9
Binary files /dev/null and b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/source-to-classes.tab_i differ
diff --git a/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/source-to-classes.tab_i.len b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/source-to-classes.tab_i.len
new file mode 100644
index 0000000000..131e265740
Binary files /dev/null and b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/source-to-classes.tab_i.len differ
diff --git a/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/subtypes.tab b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/subtypes.tab
new file mode 100644
index 0000000000..c2e245f544
Binary files /dev/null and b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/subtypes.tab differ
diff --git a/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/subtypes.tab.keystream b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/subtypes.tab.keystream
new file mode 100644
index 0000000000..9036edf88f
Binary files /dev/null and b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/subtypes.tab.keystream differ
diff --git a/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/subtypes.tab.keystream.len b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/subtypes.tab.keystream.len
new file mode 100644
index 0000000000..c2d0b7ddb4
Binary files /dev/null and b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/subtypes.tab.keystream.len differ
diff --git a/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/subtypes.tab.len b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/subtypes.tab.len
new file mode 100644
index 0000000000..3e822dd800
Binary files /dev/null and b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/subtypes.tab.len differ
diff --git a/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/subtypes.tab.values.at b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/subtypes.tab.values.at
new file mode 100644
index 0000000000..a5f03ad0c9
Binary files /dev/null and b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/subtypes.tab.values.at differ
diff --git a/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/subtypes.tab_i b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/subtypes.tab_i
new file mode 100644
index 0000000000..dce89dcd25
Binary files /dev/null and b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/subtypes.tab_i differ
diff --git a/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/subtypes.tab_i.len b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/subtypes.tab_i.len
new file mode 100644
index 0000000000..131e265740
Binary files /dev/null and b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/subtypes.tab_i.len differ
diff --git a/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/supertypes.tab b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/supertypes.tab
new file mode 100644
index 0000000000..fc1ae04109
Binary files /dev/null and b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/supertypes.tab differ
diff --git a/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/supertypes.tab.keystream b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/supertypes.tab.keystream
new file mode 100644
index 0000000000..43ccbea46f
Binary files /dev/null and b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/supertypes.tab.keystream differ
diff --git a/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/supertypes.tab.keystream.len b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/supertypes.tab.keystream.len
new file mode 100644
index 0000000000..bff9925ca3
Binary files /dev/null and b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/supertypes.tab.keystream.len differ
diff --git a/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/supertypes.tab.len b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/supertypes.tab.len
new file mode 100644
index 0000000000..672fe66962
Binary files /dev/null and b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/supertypes.tab.len differ
diff --git a/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/supertypes.tab.values.at b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/supertypes.tab.values.at
new file mode 100644
index 0000000000..b9533de737
Binary files /dev/null and b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/supertypes.tab.values.at differ
diff --git a/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/supertypes.tab_i b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/supertypes.tab_i
new file mode 100644
index 0000000000..44e747d4db
Binary files /dev/null and b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/supertypes.tab_i differ
diff --git a/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/supertypes.tab_i.len b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/supertypes.tab_i.len
new file mode 100644
index 0000000000..131e265740
Binary files /dev/null and b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/supertypes.tab_i.len differ
diff --git a/core-kotlin/build/kotlin/compileKotlin/caches-jvm/lookups/counters.tab b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/lookups/counters.tab
new file mode 100644
index 0000000000..109082bc4b
--- /dev/null
+++ b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/lookups/counters.tab
@@ -0,0 +1,2 @@
+40
+0
\ No newline at end of file
diff --git a/core-kotlin/build/kotlin/compileKotlin/caches-jvm/lookups/file-to-id.tab b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/lookups/file-to-id.tab
new file mode 100644
index 0000000000..69d1fe8fd4
Binary files /dev/null and b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/lookups/file-to-id.tab differ
diff --git a/core-kotlin/build/kotlin/compileKotlin/caches-jvm/lookups/file-to-id.tab.keystream b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/lookups/file-to-id.tab.keystream
new file mode 100644
index 0000000000..c41486a776
Binary files /dev/null and b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/lookups/file-to-id.tab.keystream differ
diff --git a/core-kotlin/build/kotlin/compileKotlin/caches-jvm/lookups/file-to-id.tab.keystream.len b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/lookups/file-to-id.tab.keystream.len
new file mode 100644
index 0000000000..0de4900d7c
Binary files /dev/null and b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/lookups/file-to-id.tab.keystream.len differ
diff --git a/core-kotlin/build/kotlin/compileKotlin/caches-jvm/lookups/file-to-id.tab.len b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/lookups/file-to-id.tab.len
new file mode 100644
index 0000000000..b3155f9573
Binary files /dev/null and b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/lookups/file-to-id.tab.len differ
diff --git a/core-kotlin/build/kotlin/compileKotlin/caches-jvm/lookups/file-to-id.tab.values.at b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/lookups/file-to-id.tab.values.at
new file mode 100644
index 0000000000..acdf22ce39
Binary files /dev/null and b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/lookups/file-to-id.tab.values.at differ
diff --git a/core-kotlin/build/kotlin/compileKotlin/caches-jvm/lookups/file-to-id.tab_i b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/lookups/file-to-id.tab_i
new file mode 100644
index 0000000000..ea2332f0e9
Binary files /dev/null and b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/lookups/file-to-id.tab_i differ
diff --git a/core-kotlin/build/kotlin/compileKotlin/caches-jvm/lookups/file-to-id.tab_i.len b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/lookups/file-to-id.tab_i.len
new file mode 100644
index 0000000000..131e265740
Binary files /dev/null and b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/lookups/file-to-id.tab_i.len differ
diff --git a/core-kotlin/build/kotlin/compileKotlin/caches-jvm/lookups/id-to-file.tab b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/lookups/id-to-file.tab
new file mode 100644
index 0000000000..23e47c0176
Binary files /dev/null and b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/lookups/id-to-file.tab differ
diff --git a/core-kotlin/build/kotlin/compileKotlin/caches-jvm/lookups/id-to-file.tab.keystream b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/lookups/id-to-file.tab.keystream
new file mode 100644
index 0000000000..80f53f5f2f
Binary files /dev/null and b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/lookups/id-to-file.tab.keystream differ
diff --git a/core-kotlin/build/kotlin/compileKotlin/caches-jvm/lookups/id-to-file.tab.keystream.len b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/lookups/id-to-file.tab.keystream.len
new file mode 100644
index 0000000000..dfa34aa15a
Binary files /dev/null and b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/lookups/id-to-file.tab.keystream.len differ
diff --git a/core-kotlin/build/kotlin/compileKotlin/caches-jvm/lookups/id-to-file.tab.len b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/lookups/id-to-file.tab.len
new file mode 100644
index 0000000000..b3155f9573
Binary files /dev/null and b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/lookups/id-to-file.tab.len differ
diff --git a/core-kotlin/build/kotlin/compileKotlin/caches-jvm/lookups/id-to-file.tab.values.at b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/lookups/id-to-file.tab.values.at
new file mode 100644
index 0000000000..91b54e8fd3
Binary files /dev/null and b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/lookups/id-to-file.tab.values.at differ
diff --git a/core-kotlin/build/kotlin/compileKotlin/caches-jvm/lookups/id-to-file.tab_i b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/lookups/id-to-file.tab_i
new file mode 100644
index 0000000000..16bee55c0c
Binary files /dev/null and b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/lookups/id-to-file.tab_i differ
diff --git a/core-kotlin/build/kotlin/compileKotlin/caches-jvm/lookups/id-to-file.tab_i.len b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/lookups/id-to-file.tab_i.len
new file mode 100644
index 0000000000..131e265740
Binary files /dev/null and b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/lookups/id-to-file.tab_i.len differ
diff --git a/core-kotlin/build/kotlin/compileKotlin/caches-jvm/lookups/lookups.tab b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/lookups/lookups.tab
new file mode 100644
index 0000000000..65cfa61e89
Binary files /dev/null and b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/lookups/lookups.tab differ
diff --git a/core-kotlin/build/kotlin/compileKotlin/caches-jvm/lookups/lookups.tab.keystream b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/lookups/lookups.tab.keystream
new file mode 100644
index 0000000000..11ca7a41b0
Binary files /dev/null and b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/lookups/lookups.tab.keystream differ
diff --git a/core-kotlin/build/kotlin/compileKotlin/caches-jvm/lookups/lookups.tab.keystream.len b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/lookups/lookups.tab.keystream.len
new file mode 100644
index 0000000000..c59a802042
Binary files /dev/null and b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/lookups/lookups.tab.keystream.len differ
diff --git a/core-kotlin/build/kotlin/compileKotlin/caches-jvm/lookups/lookups.tab.len b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/lookups/lookups.tab.len
new file mode 100644
index 0000000000..8b704bc421
Binary files /dev/null and b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/lookups/lookups.tab.len differ
diff --git a/core-kotlin/build/kotlin/compileKotlin/caches-jvm/lookups/lookups.tab.values.at b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/lookups/lookups.tab.values.at
new file mode 100644
index 0000000000..5e04b8e4fd
Binary files /dev/null and b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/lookups/lookups.tab.values.at differ
diff --git a/core-kotlin/build/kotlin/compileKotlin/caches-jvm/lookups/lookups.tab_i b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/lookups/lookups.tab_i
new file mode 100644
index 0000000000..be464ad444
Binary files /dev/null and b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/lookups/lookups.tab_i differ
diff --git a/core-kotlin/build/kotlin/compileKotlin/caches-jvm/lookups/lookups.tab_i.len b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/lookups/lookups.tab_i.len
new file mode 100644
index 0000000000..131e265740
Binary files /dev/null and b/core-kotlin/build/kotlin/compileKotlin/caches-jvm/lookups/lookups.tab_i.len differ
diff --git a/core-kotlin/build/kotlin/compileKotlin/data-container-format-version.txt b/core-kotlin/build/kotlin/compileKotlin/data-container-format-version.txt
new file mode 100644
index 0000000000..b01b80f991
--- /dev/null
+++ b/core-kotlin/build/kotlin/compileKotlin/data-container-format-version.txt
@@ -0,0 +1 @@
+2011001
\ No newline at end of file
diff --git a/core-kotlin/build/kotlin/compileKotlin/format-version.txt b/core-kotlin/build/kotlin/compileKotlin/format-version.txt
new file mode 100644
index 0000000000..2408adbb9f
--- /dev/null
+++ b/core-kotlin/build/kotlin/compileKotlin/format-version.txt
@@ -0,0 +1 @@
+8011001
\ No newline at end of file
diff --git a/core-kotlin/build/kotlin/compileKotlin/gradle-format-version.txt b/core-kotlin/build/kotlin/compileKotlin/gradle-format-version.txt
new file mode 100644
index 0000000000..7289c6bdc4
--- /dev/null
+++ b/core-kotlin/build/kotlin/compileKotlin/gradle-format-version.txt
@@ -0,0 +1 @@
+4011001
\ No newline at end of file
diff --git a/core-kotlin/build/kotlin/compileKotlin/last-build.bin b/core-kotlin/build/kotlin/compileKotlin/last-build.bin
new file mode 100644
index 0000000000..baf638a29b
Binary files /dev/null and b/core-kotlin/build/kotlin/compileKotlin/last-build.bin differ
diff --git a/core-kotlin/gradle/wrapper/gradle-wrapper.jar b/core-kotlin/gradle/wrapper/gradle-wrapper.jar
new file mode 100755
index 0000000000..01b8bf6b1f
Binary files /dev/null and b/core-kotlin/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/core-kotlin/gradle/wrapper/gradle-wrapper.properties b/core-kotlin/gradle/wrapper/gradle-wrapper.properties
new file mode 100755
index 0000000000..0b83b5a3e3
--- /dev/null
+++ b/core-kotlin/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,5 @@
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-bin.zip
diff --git a/core-kotlin/gradlew b/core-kotlin/gradlew
new file mode 100755
index 0000000000..cccdd3d517
--- /dev/null
+++ b/core-kotlin/gradlew
@@ -0,0 +1,172 @@
+#!/usr/bin/env sh
+
+##############################################################################
+##
+## Gradle start up script for UN*X
+##
+##############################################################################
+
+# Attempt to set APP_HOME
+# Resolve links: $0 may be a link
+PRG="$0"
+# Need this for relative symlinks.
+while [ -h "$PRG" ] ; do
+ ls=`ls -ld "$PRG"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ PRG="$link"
+ else
+ PRG=`dirname "$PRG"`"/$link"
+ fi
+done
+SAVED="`pwd`"
+cd "`dirname \"$PRG\"`/" >/dev/null
+APP_HOME="`pwd -P`"
+cd "$SAVED" >/dev/null
+
+APP_NAME="Gradle"
+APP_BASE_NAME=`basename "$0"`
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS=""
+
+# Use the maximum available, or set MAX_FD != -1 to use that value.
+MAX_FD="maximum"
+
+warn () {
+ echo "$*"
+}
+
+die () {
+ echo
+ echo "$*"
+ echo
+ exit 1
+}
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false
+msys=false
+darwin=false
+nonstop=false
+case "`uname`" in
+ CYGWIN* )
+ cygwin=true
+ ;;
+ Darwin* )
+ darwin=true
+ ;;
+ MINGW* )
+ msys=true
+ ;;
+ NONSTOP* )
+ nonstop=true
+ ;;
+esac
+
+CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
+
+# Determine the Java command to use to start the JVM.
+if [ -n "$JAVA_HOME" ] ; then
+ if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+ # IBM's JDK on AIX uses strange locations for the executables
+ JAVACMD="$JAVA_HOME/jre/sh/java"
+ else
+ JAVACMD="$JAVA_HOME/bin/java"
+ fi
+ if [ ! -x "$JAVACMD" ] ; then
+ die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+ fi
+else
+ JAVACMD="java"
+ which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+fi
+
+# Increase the maximum file descriptors if we can.
+if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
+ MAX_FD_LIMIT=`ulimit -H -n`
+ if [ $? -eq 0 ] ; then
+ if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
+ MAX_FD="$MAX_FD_LIMIT"
+ fi
+ ulimit -n $MAX_FD
+ if [ $? -ne 0 ] ; then
+ warn "Could not set maximum file descriptor limit: $MAX_FD"
+ fi
+ else
+ warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
+ fi
+fi
+
+# For Darwin, add options to specify how the application appears in the dock
+if $darwin; then
+ GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
+fi
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin ; then
+ APP_HOME=`cygpath --path --mixed "$APP_HOME"`
+ CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
+ JAVACMD=`cygpath --unix "$JAVACMD"`
+
+ # We build the pattern for arguments to be converted via cygpath
+ ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
+ SEP=""
+ for dir in $ROOTDIRSRAW ; do
+ ROOTDIRS="$ROOTDIRS$SEP$dir"
+ SEP="|"
+ done
+ OURCYGPATTERN="(^($ROOTDIRS))"
+ # Add a user-defined pattern to the cygpath arguments
+ if [ "$GRADLE_CYGPATTERN" != "" ] ; then
+ OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
+ fi
+ # Now convert the arguments - kludge to limit ourselves to /bin/sh
+ i=0
+ for arg in "$@" ; do
+ CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
+ CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
+
+ if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
+ eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
+ else
+ eval `echo args$i`="\"$arg\""
+ fi
+ i=$((i+1))
+ done
+ case $i in
+ (0) set -- ;;
+ (1) set -- "$args0" ;;
+ (2) set -- "$args0" "$args1" ;;
+ (3) set -- "$args0" "$args1" "$args2" ;;
+ (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
+ (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
+ (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
+ (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
+ (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
+ (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
+ esac
+fi
+
+# Escape application args
+save () {
+ for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
+ echo " "
+}
+APP_ARGS=$(save "$@")
+
+# Collect all arguments for the java command, following the shell quoting and substitution rules
+eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
+
+# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
+if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
+ cd "$(dirname "$0")"
+fi
+
+exec "$JAVACMD" "$@"
diff --git a/core-kotlin/gradlew.bat b/core-kotlin/gradlew.bat
new file mode 100755
index 0000000000..e95643d6a2
--- /dev/null
+++ b/core-kotlin/gradlew.bat
@@ -0,0 +1,84 @@
+@if "%DEBUG%" == "" @echo off
+@rem ##########################################################################
+@rem
+@rem Gradle startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+set DEFAULT_JVM_OPTS=
+
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+set JAVA_EXE=java.exe
+%JAVA_EXE% -version >NUL 2>&1
+if "%ERRORLEVEL%" == "0" goto init
+
+echo.
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto init
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:init
+@rem Get command-line arguments, handling Windows variants
+
+if not "%OS%" == "Windows_NT" goto win9xME_args
+
+:win9xME_args
+@rem Slurp the command line arguments.
+set CMD_LINE_ARGS=
+set _SKIP=2
+
+:win9xME_args_slurp
+if "x%~1" == "x" goto execute
+
+set CMD_LINE_ARGS=%*
+
+:execute
+@rem Setup the command line
+
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+
+@rem Execute Gradle
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
+
+:end
+@rem End local scope for the variables with windows NT shell
+if "%ERRORLEVEL%"=="0" goto mainEnd
+
+:fail
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
+rem the _cmd.exe /c_ return code!
+if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
+exit /b 1
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega
diff --git a/core-kotlin/kotlin-ktor/.gitignore b/core-kotlin/kotlin-ktor/.gitignore
new file mode 100644
index 0000000000..0c017e8f8c
--- /dev/null
+++ b/core-kotlin/kotlin-ktor/.gitignore
@@ -0,0 +1,14 @@
+/bin/
+
+#ignore gradle
+.gradle/
+
+
+#ignore build and generated files
+build/
+node/
+out/
+
+#ignore installed node modules and package lock file
+node_modules/
+package-lock.json
diff --git a/core-kotlin/kotlin-ktor/build.gradle b/core-kotlin/kotlin-ktor/build.gradle
new file mode 100755
index 0000000000..5c8f523cf1
--- /dev/null
+++ b/core-kotlin/kotlin-ktor/build.gradle
@@ -0,0 +1,47 @@
+
+
+group 'com.baeldung.ktor'
+version '1.0-SNAPSHOT'
+
+
+buildscript {
+ ext.kotlin_version = '1.2.41'
+ ext.ktor_version = '0.9.2'
+
+ repositories {
+ mavenCentral()
+ }
+ dependencies {
+ classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
+ }
+}
+
+apply plugin: 'java'
+apply plugin: 'kotlin'
+apply plugin: 'application'
+
+mainClassName = 'APIServer.kt'
+
+sourceCompatibility = 1.8
+compileKotlin { kotlinOptions.jvmTarget = "1.8" }
+compileTestKotlin { kotlinOptions.jvmTarget = "1.8" }
+
+kotlin { experimental { coroutines "enable" } }
+
+repositories {
+ mavenCentral()
+ jcenter()
+ maven { url "https://dl.bintray.com/kotlin/ktor" }
+}
+
+dependencies {
+ compile "io.ktor:ktor-server-netty:$ktor_version"
+ compile "ch.qos.logback:logback-classic:1.2.1"
+ compile "io.ktor:ktor-gson:$ktor_version"
+ testCompile group: 'junit', name: 'junit', version: '4.12'
+
+}
+task runServer(type: JavaExec) {
+ main = 'APIServer'
+ classpath = sourceSets.main.runtimeClasspath
+}
\ No newline at end of file
diff --git a/core-kotlin/kotlin-ktor/gradle/wrapper/gradle-wrapper.jar b/core-kotlin/kotlin-ktor/gradle/wrapper/gradle-wrapper.jar
new file mode 100755
index 0000000000..01b8bf6b1f
Binary files /dev/null and b/core-kotlin/kotlin-ktor/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/core-kotlin/kotlin-ktor/gradle/wrapper/gradle-wrapper.properties b/core-kotlin/kotlin-ktor/gradle/wrapper/gradle-wrapper.properties
new file mode 100755
index 0000000000..0b83b5a3e3
--- /dev/null
+++ b/core-kotlin/kotlin-ktor/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,5 @@
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-bin.zip
diff --git a/core-kotlin/kotlin-ktor/gradlew b/core-kotlin/kotlin-ktor/gradlew
new file mode 100755
index 0000000000..cccdd3d517
--- /dev/null
+++ b/core-kotlin/kotlin-ktor/gradlew
@@ -0,0 +1,172 @@
+#!/usr/bin/env sh
+
+##############################################################################
+##
+## Gradle start up script for UN*X
+##
+##############################################################################
+
+# Attempt to set APP_HOME
+# Resolve links: $0 may be a link
+PRG="$0"
+# Need this for relative symlinks.
+while [ -h "$PRG" ] ; do
+ ls=`ls -ld "$PRG"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ PRG="$link"
+ else
+ PRG=`dirname "$PRG"`"/$link"
+ fi
+done
+SAVED="`pwd`"
+cd "`dirname \"$PRG\"`/" >/dev/null
+APP_HOME="`pwd -P`"
+cd "$SAVED" >/dev/null
+
+APP_NAME="Gradle"
+APP_BASE_NAME=`basename "$0"`
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS=""
+
+# Use the maximum available, or set MAX_FD != -1 to use that value.
+MAX_FD="maximum"
+
+warn () {
+ echo "$*"
+}
+
+die () {
+ echo
+ echo "$*"
+ echo
+ exit 1
+}
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false
+msys=false
+darwin=false
+nonstop=false
+case "`uname`" in
+ CYGWIN* )
+ cygwin=true
+ ;;
+ Darwin* )
+ darwin=true
+ ;;
+ MINGW* )
+ msys=true
+ ;;
+ NONSTOP* )
+ nonstop=true
+ ;;
+esac
+
+CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
+
+# Determine the Java command to use to start the JVM.
+if [ -n "$JAVA_HOME" ] ; then
+ if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+ # IBM's JDK on AIX uses strange locations for the executables
+ JAVACMD="$JAVA_HOME/jre/sh/java"
+ else
+ JAVACMD="$JAVA_HOME/bin/java"
+ fi
+ if [ ! -x "$JAVACMD" ] ; then
+ die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+ fi
+else
+ JAVACMD="java"
+ which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+fi
+
+# Increase the maximum file descriptors if we can.
+if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
+ MAX_FD_LIMIT=`ulimit -H -n`
+ if [ $? -eq 0 ] ; then
+ if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
+ MAX_FD="$MAX_FD_LIMIT"
+ fi
+ ulimit -n $MAX_FD
+ if [ $? -ne 0 ] ; then
+ warn "Could not set maximum file descriptor limit: $MAX_FD"
+ fi
+ else
+ warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
+ fi
+fi
+
+# For Darwin, add options to specify how the application appears in the dock
+if $darwin; then
+ GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
+fi
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin ; then
+ APP_HOME=`cygpath --path --mixed "$APP_HOME"`
+ CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
+ JAVACMD=`cygpath --unix "$JAVACMD"`
+
+ # We build the pattern for arguments to be converted via cygpath
+ ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
+ SEP=""
+ for dir in $ROOTDIRSRAW ; do
+ ROOTDIRS="$ROOTDIRS$SEP$dir"
+ SEP="|"
+ done
+ OURCYGPATTERN="(^($ROOTDIRS))"
+ # Add a user-defined pattern to the cygpath arguments
+ if [ "$GRADLE_CYGPATTERN" != "" ] ; then
+ OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
+ fi
+ # Now convert the arguments - kludge to limit ourselves to /bin/sh
+ i=0
+ for arg in "$@" ; do
+ CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
+ CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
+
+ if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
+ eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
+ else
+ eval `echo args$i`="\"$arg\""
+ fi
+ i=$((i+1))
+ done
+ case $i in
+ (0) set -- ;;
+ (1) set -- "$args0" ;;
+ (2) set -- "$args0" "$args1" ;;
+ (3) set -- "$args0" "$args1" "$args2" ;;
+ (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
+ (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
+ (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
+ (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
+ (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
+ (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
+ esac
+fi
+
+# Escape application args
+save () {
+ for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
+ echo " "
+}
+APP_ARGS=$(save "$@")
+
+# Collect all arguments for the java command, following the shell quoting and substitution rules
+eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
+
+# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
+if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
+ cd "$(dirname "$0")"
+fi
+
+exec "$JAVACMD" "$@"
diff --git a/core-kotlin/kotlin-ktor/gradlew.bat b/core-kotlin/kotlin-ktor/gradlew.bat
new file mode 100755
index 0000000000..e95643d6a2
--- /dev/null
+++ b/core-kotlin/kotlin-ktor/gradlew.bat
@@ -0,0 +1,84 @@
+@if "%DEBUG%" == "" @echo off
+@rem ##########################################################################
+@rem
+@rem Gradle startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+set DEFAULT_JVM_OPTS=
+
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+set JAVA_EXE=java.exe
+%JAVA_EXE% -version >NUL 2>&1
+if "%ERRORLEVEL%" == "0" goto init
+
+echo.
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto init
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:init
+@rem Get command-line arguments, handling Windows variants
+
+if not "%OS%" == "Windows_NT" goto win9xME_args
+
+:win9xME_args
+@rem Slurp the command line arguments.
+set CMD_LINE_ARGS=
+set _SKIP=2
+
+:win9xME_args_slurp
+if "x%~1" == "x" goto execute
+
+set CMD_LINE_ARGS=%*
+
+:execute
+@rem Setup the command line
+
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+
+@rem Execute Gradle
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
+
+:end
+@rem End local scope for the variables with windows NT shell
+if "%ERRORLEVEL%"=="0" goto mainEnd
+
+:fail
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
+rem the _cmd.exe /c_ return code!
+if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
+exit /b 1
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega
diff --git a/core-kotlin/kotlin-ktor/resources/logback.xml b/core-kotlin/kotlin-ktor/resources/logback.xml
new file mode 100755
index 0000000000..274cdcdb02
--- /dev/null
+++ b/core-kotlin/kotlin-ktor/resources/logback.xml
@@ -0,0 +1,11 @@
+
+
+
+ %d{YYYY-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/core-kotlin/kotlin-ktor/settings.gradle b/core-kotlin/kotlin-ktor/settings.gradle
new file mode 100755
index 0000000000..13bbce9583
--- /dev/null
+++ b/core-kotlin/kotlin-ktor/settings.gradle
@@ -0,0 +1,2 @@
+rootProject.name = 'KtorWithKotlin'
+
diff --git a/core-kotlin/kotlin-ktor/src/main/kotlin/APIServer.kt b/core-kotlin/kotlin-ktor/src/main/kotlin/APIServer.kt
new file mode 100755
index 0000000000..a12182ccc8
--- /dev/null
+++ b/core-kotlin/kotlin-ktor/src/main/kotlin/APIServer.kt
@@ -0,0 +1,73 @@
+@file:JvmName("APIServer")
+
+
+import io.ktor.application.call
+import io.ktor.application.install
+import io.ktor.features.CallLogging
+import io.ktor.features.ContentNegotiation
+import io.ktor.features.DefaultHeaders
+import io.ktor.gson.gson
+import io.ktor.request.path
+import io.ktor.request.receive
+import io.ktor.response.respond
+import io.ktor.routing.*
+import io.ktor.server.engine.embeddedServer
+import io.ktor.server.netty.Netty
+import org.slf4j.event.Level
+
+data class Author(val name: String, val website: String)
+data class ToDo(var id: Int, val name: String, val description: String, val completed: Boolean)
+
+fun main(args: Array) {
+
+ val toDoList = ArrayList();
+ val jsonResponse = """{
+ "id": 1,
+ "task": "Pay waterbill",
+ "description": "Pay water bill today",
+ }"""
+
+
+ embeddedServer(Netty, 8080) {
+ install(DefaultHeaders) {
+ header("X-Developer", "Baeldung")
+ }
+ install(CallLogging) {
+ level = Level.DEBUG
+ filter { call -> call.request.path().startsWith("/todo") }
+ filter { call -> call.request.path().startsWith("/author") }
+ }
+ install(ContentNegotiation) {
+ gson {
+ setPrettyPrinting()
+ }
+ }
+ routing() {
+ route("/todo") {
+ post {
+ var toDo = call.receive();
+ toDo.id = toDoList.size;
+ toDoList.add(toDo);
+ call.respond("Added")
+
+ }
+ delete("/{id}") {
+ call.respond(toDoList.removeAt(call.parameters["id"]!!.toInt()));
+ }
+ get("/{id}") {
+
+ call.respond(toDoList[call.parameters["id"]!!.toInt()]);
+ }
+ get {
+ call.respond(toDoList);
+ }
+ }
+ get("/author"){
+ call.respond(Author("Baeldung","baeldung.com"));
+
+ }
+
+
+ }
+ }.start(wait = true)
+}
\ No newline at end of file
diff --git a/core-kotlin/kotlin-ktor/webapp/WEB-INF/web.xml b/core-kotlin/kotlin-ktor/webapp/WEB-INF/web.xml
new file mode 100755
index 0000000000..513a80cb27
--- /dev/null
+++ b/core-kotlin/kotlin-ktor/webapp/WEB-INF/web.xml
@@ -0,0 +1,35 @@
+
+
+
+
+
+
+ io.ktor.ktor.config
+ application.conf
+
+
+
+ KtorServlet
+ KtorServlet
+ io.ktor.server.servlet.ServletApplicationEngine
+
+
+ true
+
+
+
+ 304857600
+ 304857600
+ 0
+
+
+
+
+ KtorServlet
+ /
+
+
+
\ No newline at end of file
diff --git a/core-kotlin/resources/logback.xml b/core-kotlin/resources/logback.xml
new file mode 100755
index 0000000000..274cdcdb02
--- /dev/null
+++ b/core-kotlin/resources/logback.xml
@@ -0,0 +1,11 @@
+
+
+
+ %d{YYYY-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/core-kotlin/settings.gradle b/core-kotlin/settings.gradle
new file mode 100755
index 0000000000..13bbce9583
--- /dev/null
+++ b/core-kotlin/settings.gradle
@@ -0,0 +1,2 @@
+rootProject.name = 'KtorWithKotlin'
+
diff --git a/core-kotlin/src/main/kotlin/com/baeldung/ktor/APIServer.kt b/core-kotlin/src/main/kotlin/com/baeldung/ktor/APIServer.kt
new file mode 100755
index 0000000000..a12182ccc8
--- /dev/null
+++ b/core-kotlin/src/main/kotlin/com/baeldung/ktor/APIServer.kt
@@ -0,0 +1,73 @@
+@file:JvmName("APIServer")
+
+
+import io.ktor.application.call
+import io.ktor.application.install
+import io.ktor.features.CallLogging
+import io.ktor.features.ContentNegotiation
+import io.ktor.features.DefaultHeaders
+import io.ktor.gson.gson
+import io.ktor.request.path
+import io.ktor.request.receive
+import io.ktor.response.respond
+import io.ktor.routing.*
+import io.ktor.server.engine.embeddedServer
+import io.ktor.server.netty.Netty
+import org.slf4j.event.Level
+
+data class Author(val name: String, val website: String)
+data class ToDo(var id: Int, val name: String, val description: String, val completed: Boolean)
+
+fun main(args: Array) {
+
+ val toDoList = ArrayList();
+ val jsonResponse = """{
+ "id": 1,
+ "task": "Pay waterbill",
+ "description": "Pay water bill today",
+ }"""
+
+
+ embeddedServer(Netty, 8080) {
+ install(DefaultHeaders) {
+ header("X-Developer", "Baeldung")
+ }
+ install(CallLogging) {
+ level = Level.DEBUG
+ filter { call -> call.request.path().startsWith("/todo") }
+ filter { call -> call.request.path().startsWith("/author") }
+ }
+ install(ContentNegotiation) {
+ gson {
+ setPrettyPrinting()
+ }
+ }
+ routing() {
+ route("/todo") {
+ post {
+ var toDo = call.receive();
+ toDo.id = toDoList.size;
+ toDoList.add(toDo);
+ call.respond("Added")
+
+ }
+ delete("/{id}") {
+ call.respond(toDoList.removeAt(call.parameters["id"]!!.toInt()));
+ }
+ get("/{id}") {
+
+ call.respond(toDoList[call.parameters["id"]!!.toInt()]);
+ }
+ get {
+ call.respond(toDoList);
+ }
+ }
+ get("/author"){
+ call.respond(Author("Baeldung","baeldung.com"));
+
+ }
+
+
+ }
+ }.start(wait = true)
+}
\ No newline at end of file
diff --git a/kotlin-ktor/src/main/kotlin/APIServer.kt b/kotlin-ktor/src/main/kotlin/APIServer.kt
index 57ccbbe523..a12182ccc8 100755
--- a/kotlin-ktor/src/main/kotlin/APIServer.kt
+++ b/kotlin-ktor/src/main/kotlin/APIServer.kt
@@ -33,7 +33,7 @@ fun main(args: Array) {
header("X-Developer", "Baeldung")
}
install(CallLogging) {
- level = Level.INFO
+ level = Level.DEBUG
filter { call -> call.request.path().startsWith("/todo") }
filter { call -> call.request.path().startsWith("/author") }
}