-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
109 lines (98 loc) · 3.34 KB
/
build.gradle.kts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
buildscript {
repositories {
mavenCentral()
}
}
repositories {
mavenCentral()
maven("https://maven.tryformation.com/releases") {
content {
includeGroup("com.jillesvangurp")
}
}
}
plugins {
id("org.jetbrains.kotlin.jvm")
id("org.jetbrains.dokka")
id("maven-publish")
}
dependencies {
api(Kotlin.stdlib.jdk8)
// use -jvm dependencies here because otherwise kts fails to fetch
api("com.jillesvangurp:search-client:_")
api("com.jillesvangurp:search-dsls:_")
api("com.jillesvangurp:json-dsl:_")
api("com.jillesvangurp:kotlinx-serialization-extensions:_")
api("org.jetbrains.kotlinx:kotlinx-cli-jvm:_")
api(KotlinX.datetime)
api(Ktor.client.core)
api(KotlinX.coroutines.core)
api(KotlinX.serialization.json)
api(Ktor.client.core)
api(Ktor.client.auth)
api(Ktor.client.logging)
api(Ktor.client.serialization)
api("io.ktor:ktor-client-logging:_")
api("io.ktor:ktor-serialization-kotlinx:_")
api("io.ktor:ktor-serialization-kotlinx-json:_")
api("io.ktor:ktor-client-content-negotiation:_")
api(Ktor.client.java)
api("ch.qos.logback:logback-classic:_")
testImplementation(Testing.junit.jupiter.api)
testImplementation(Testing.junit.jupiter.engine)
testImplementation(Testing.kotest.assertions.core)
}
tasks.withType<Test> {
useJUnitPlatform()
testLogging.exceptionFormat = org.gradle.api.tasks.testing.logging.TestExceptionFormat.FULL
testLogging.events = setOf(
org.gradle.api.tasks.testing.logging.TestLogEvent.FAILED,
org.gradle.api.tasks.testing.logging.TestLogEvent.PASSED,
org.gradle.api.tasks.testing.logging.TestLogEvent.SKIPPED,
org.gradle.api.tasks.testing.logging.TestLogEvent.STANDARD_ERROR,
org.gradle.api.tasks.testing.logging.TestLogEvent.STANDARD_OUT
)
}
val artifactName = "kt-search-kts"
val artifactGroup = "com.github.jillesvangurp"
val sourceJar = task("sourceJar", Jar::class) {
dependsOn(tasks["classes"])
archiveClassifier.set("sources")
from(sourceSets.main.get().allSource)
}
val javadocJar = task("javadocJar", Jar::class) {
from(tasks["dokkaJavadoc"])
archiveClassifier.set("javadoc")
}
publishing {
publications {
create<MavenPublication>("mavenJava") {
groupId = artifactGroup
artifactId = artifactName
pom {
description.set("Kts extensions for kt-search. Easily script operations for Elasticsearch and Opensearch with .main.kts scripts")
name.set(artifactId)
url.set("https://github.com/jillesvangurp/kt-search-kts")
licenses {
license {
name.set("MIT")
url.set("https://github.com/jillesvangurp/kt-search-kts/LICENSE")
distribution.set("repo")
}
}
developers {
developer {
id.set("jillesvangurp")
name.set("Jilles van Gurp")
}
}
scm {
url.set("https://github.com/jillesvangurp/kt-search-kts/LICENSE")
}
}
from(components["java"])
artifact(sourceJar)
artifact(javadocJar)
}
}
}