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 2.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
  2. version = "0.1.0"
  3. group = "com.dmdirc.ktirc"
  4. plugins {
  5. `maven-publish`
  6. kotlin("jvm") version "1.3.0-rc-190"
  7. id("com.jfrog.bintray") version "1.8.4"
  8. }
  9. configurations {
  10. create("itestImplementation") { extendsFrom(getByName("testImplementation")) }
  11. create("itestRuntime") { extendsFrom(getByName("testRuntime")) }
  12. }
  13. repositories {
  14. jcenter()
  15. mavenCentral()
  16. maven("http://dl.bintray.com/kotlin/kotlin-eap")
  17. maven("https://dl.bintray.com/kotlin/ktor")
  18. }
  19. dependencies {
  20. implementation(kotlin("stdlib-jdk8"))
  21. implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:0.30.2-eap13")
  22. implementation("io.ktor:ktor-network:1.0.0-beta-1")
  23. testImplementation("com.nhaarman.mockitokotlin2:mockito-kotlin:2.0.0-RC3")
  24. testImplementation("org.junit.jupiter:junit-jupiter-api:5.3.1")
  25. testImplementation("org.junit.jupiter:junit-jupiter-params:5.3.1")
  26. testRuntime("org.junit.jupiter:junit-jupiter-engine:5.3.1")
  27. }
  28. java {
  29. sourceCompatibility = JavaVersion.VERSION_1_8
  30. targetCompatibility = JavaVersion.VERSION_1_8
  31. sourceSets {
  32. create("itest") {
  33. compileClasspath += getByName("main").output
  34. runtimeClasspath += getByName("main").output
  35. java.srcDirs("src/itest/kotlin")
  36. }
  37. }
  38. }
  39. task<Test>("itest") {
  40. group = "verification"
  41. testClassesDirs = java.sourceSets.getByName("itest").output.classesDirs
  42. classpath = java.sourceSets.getByName("itest").runtimeClasspath
  43. }
  44. task<Jar>("sourceJar") {
  45. description = "Creates a JAR that contains the source code."
  46. from(java.sourceSets["main"].allSource)
  47. classifier = "sources"
  48. }
  49. tasks.withType<KotlinCompile> {
  50. kotlinOptions {
  51. jvmTarget = "1.8"
  52. }
  53. }
  54. tasks.withType<Test> {
  55. useJUnitPlatform()
  56. testLogging {
  57. events("passed", "skipped", "failed")
  58. }
  59. }
  60. configurations.all {
  61. resolutionStrategy.eachDependency {
  62. if (requested.group == "org.jetbrains.kotlin") {
  63. useVersion("1.3.0-rc-190")
  64. }
  65. }
  66. }
  67. publishing {
  68. publications {
  69. create<MavenPublication>("Publication") {
  70. groupId = "com.dmdirc"
  71. artifactId = "ktirc"
  72. version = project.version as String
  73. artifact(tasks["jar"])
  74. artifact(tasks["sourceJar"])
  75. }
  76. }
  77. }
  78. bintray {
  79. user = System.getenv("BINTRAY_USER")
  80. key = System.getenv("BINTRAY_API_KEY")
  81. setPublications("Publication")
  82. with(pkg) {
  83. userOrg = "dmdirc"
  84. repo = "releases"
  85. name = "ktirc"
  86. publish = true
  87. desc = "A kotlin library for connecting to and interacting with IRC"
  88. setLicenses("MIT")
  89. vcsUrl = "https://g.c5h.io/public/ktirc"
  90. }
  91. }