-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
109 lines (90 loc) · 3.12 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
val kotlinVersion: String = "1.8.22"
plugins {
kotlin("jvm") version "1.8.22"
id("com.adarshr.test-logger") version "3.2.0"
`maven-publish`
signing
idea
}
group = "net.igsoft"
version = "0.5.0"
repositories {
mavenCentral()
}
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(11))
}
withJavadocJar()
withSourcesJar()
}
testlogger {
showStandardStreams = true
showFullStackTraces = false
}
tasks.test {
useJUnitPlatform()
}
val licencesSpec = Action<MavenPomLicenseSpec> {
license {
name.set("MIT License")
url.set("https://opensource.org/licenses/MIT")
}
}
val developersSpec = Action<MavenPomDeveloperSpec> {
developer {
id.set("aartiPl")
name.set("Marcin Kuszczak")
email.set("aarti@interia.pl")
}
}
val scmSpec = Action<MavenPomScm> {
connection.set("scm:git:git://https://github.com/aartiPl/funclient.git")
developerConnection.set("scm:git:ssh:https://github.com/aartiPl/funclient.git")
url.set("https://github.com/aartiPl/funclient/tree/master")
}
publishing {
publications {
create<MavenPublication>("funclient") {
artifactId = "funclient"
from(components["java"])
pom {
name.set("funclient")
description.set("FunClient - HTTP client - functional way")
url.set("https://github.com/aartiPl/funclient")
licenses(licencesSpec)
developers(developersSpec)
scm(scmSpec)
}
}
}
repositories {
maven {
val releasesRepoUrl = "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
val snapshotsRepoUrl = "https://oss.sonatype.org/content/repositories/snapshots/"
url = uri(if (project.version.toString().endsWith("SNAPSHOT")) snapshotsRepoUrl else releasesRepoUrl)
credentials {
username = project.findProperty("sonatype.user") as String? ?: System.getenv("SONATYPE_USER")
password = project.findProperty("sonatype.password") as String? ?: System.getenv("SONATYPE_PASSWORD")
}
}
}
}
signing {
sign(publishing.publications["funclient"])
}
dependencies {
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion")
implementation("org.jetbrains.kotlin:kotlin-reflect:$kotlinVersion")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4")
implementation("org.apache.commons:commons-lang3:3.12.0")
implementation("com.konghq:unirest-java:3.13.13")
implementation("com.google.code.gson:gson:2.10")
testImplementation("org.junit.platform:junit-platform-suite-engine:1.9.0")
testImplementation("org.junit.platform:junit-platform-suite-api:1.9.0")
testImplementation("org.junit.platform:junit-platform-suite-commons:1.9.0")
testImplementation("org.junit.jupiter:junit-jupiter-engine:5.9.0")
testImplementation("org.junit.jupiter:junit-jupiter-params:5.9.0")
testImplementation("com.willowtreeapps.assertk:assertk-jvm:0.26.1")
testImplementation("io.mockk:mockk:1.13.2")
}