You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

build.gradle.kts 1.8KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
  2. plugins {
  3. kotlin("jvm") version "1.3.0-rc-190"
  4. }
  5. configurations {
  6. create("itestImplementation") { extendsFrom(getByName("testImplementation")) }
  7. create("itestRuntime") { extendsFrom(getByName("testRuntime")) }
  8. }
  9. repositories {
  10. jcenter()
  11. mavenCentral()
  12. maven("http://dl.bintray.com/kotlin/kotlin-eap")
  13. maven("https://dl.bintray.com/kotlin/ktor")
  14. }
  15. dependencies {
  16. implementation(kotlin("stdlib-jdk8"))
  17. implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:0.30.2-eap13")
  18. implementation("io.ktor:ktor-network:1.0.0-beta-1")
  19. testImplementation("com.nhaarman.mockitokotlin2:mockito-kotlin:2.0.0-RC3")
  20. testImplementation("org.junit.jupiter:junit-jupiter-api:5.3.1")
  21. testImplementation("org.junit.jupiter:junit-jupiter-params:5.3.1")
  22. testRuntime("org.junit.jupiter:junit-jupiter-engine:5.3.1")
  23. }
  24. java {
  25. sourceCompatibility = JavaVersion.VERSION_1_8
  26. targetCompatibility = JavaVersion.VERSION_1_8
  27. sourceSets {
  28. create("itest") {
  29. compileClasspath += getByName("main").output
  30. runtimeClasspath += getByName("main").output
  31. java.srcDirs("src/itest/kotlin")
  32. }
  33. }
  34. }
  35. tasks.create<Test>("itest") {
  36. group = "verification"
  37. testClassesDirs = java.sourceSets.getByName("itest").output.classesDirs
  38. classpath = java.sourceSets.getByName("itest").runtimeClasspath
  39. }
  40. tasks.withType<KotlinCompile> {
  41. kotlinOptions {
  42. jvmTarget = "1.8"
  43. }
  44. }
  45. tasks.withType<Test> {
  46. useJUnitPlatform()
  47. testLogging {
  48. events("passed", "skipped", "failed")
  49. }
  50. }
  51. configurations.all {
  52. resolutionStrategy.eachDependency {
  53. if (requested.group == "org.jetbrains.kotlin") {
  54. useVersion("1.3.0-rc-190")
  55. }
  56. }
  57. }