| 
									
										
										
										
											2018-09-09 11:01:53 +05:30
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | group 'com.baeldung.ktor' | 
					
						
							|  |  |  | version '1.0-SNAPSHOT' | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | buildscript { | 
					
						
							|  |  |  |     ext.kotlin_version = '1.2.41' | 
					
						
							|  |  |  |     ext.ktor_version = '0.9.2' | 
					
						
							| 
									
										
										
										
											2019-05-08 16:52:00 +02:00
										 |  |  |     ext.khttp_version = '0.1.0' | 
					
						
							| 
									
										
										
										
											2018-09-09 11:01:53 +05:30
										 |  |  | 
 | 
					
						
							|  |  |  |     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" | 
					
						
							| 
									
										
										
										
											2019-05-08 16:52:00 +02:00
										 |  |  |     compile "khttp:khttp:$khttp_version" | 
					
						
							| 
									
										
										
										
											2018-09-09 11:01:53 +05:30
										 |  |  |     testCompile group: 'junit', name: 'junit', version: '4.12' | 
					
						
							| 
									
										
										
										
											2019-05-08 16:52:00 +02:00
										 |  |  |     testCompile group: 'org.jetbrains.spek', name: 'spek-api', version: '1.1.5' | 
					
						
							|  |  |  |     testCompile group: 'org.jetbrains.spek', name: 'spek-subject-extension', version: '1.1.5' | 
					
						
							|  |  |  |     testCompile group: 'org.jetbrains.spek', name: 'spek-junit-platform-engine', version: '1.1.5' | 
					
						
							| 
									
										
										
										
											2018-09-09 11:01:53 +05:30
										 |  |  |     implementation 'com.beust:klaxon:3.0.1' | 
					
						
							|  |  |  | } | 
					
						
							| 
									
										
										
										
											2019-05-14 22:41:48 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-09-09 11:01:53 +05:30
										 |  |  | task runServer(type: JavaExec) { | 
					
						
							|  |  |  |     main = 'APIServer' | 
					
						
							|  |  |  |    classpath = sourceSets.main.runtimeClasspath | 
					
						
							| 
									
										
										
										
											2019-05-08 16:52:00 +02:00
										 |  |  | } |