-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
126 lines (106 loc) · 2.96 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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
plugins {
kotlin("jvm") version "1.6.0"
id("io.spring.dependency-management") version "1.0.11.RELEASE"
`maven-publish`
signing
}
group = "run.cobalt"
version = "0.0.2"
java.sourceCompatibility = JavaVersion.VERSION_11
repositories {
maven(url = "https://plugins.gradle.org/m2/")
mavenCentral()
}
tasks {
compileKotlin {
kotlinOptions {
jvmTarget = "11"
}
}
compileTestKotlin {
kotlinOptions {
jvmTarget = "11"
}
}
val sourcesJar by creating(Jar::class) {
archiveClassifier.set("sources")
from(sourceSets.main.get().allSource)
}
val javadocJar by creating(Jar::class) {
dependsOn.add(javadoc)
archiveClassifier.set("javadoc")
from(javadoc)
}
artifacts {
archives(sourcesJar)
archives(javadocJar)
archives(jar)
}
}
publishing {
repositories {
maven {
credentials {
username = project.property("ossrhUsername").toString()
password = project.property("ossrhPassword").toString()
}
val releasesRepoUrl = uri("https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/")
val snapshotsRepoUrl = uri("https://s01.oss.sonatype.org/content/repositories/snapshots/")
url = if (version.toString().endsWith("SNAPSHOT")) snapshotsRepoUrl else releasesRepoUrl
}
}
publications {
create<MavenPublication>("vortex") {
groupId = "$group"
artifactId = rootProject.name
version = version
from(components["java"])
artifact(tasks["sourcesJar"])
artifact(tasks["javadocJar"])
pom {
name.set("vortex")
packaging = "jar"
description.set("Kotlin functional extensions for Spring Webflux")
url.set("https://github.com/cobaltinc/vortex")
licenses {
license {
name.set("The MIT License")
url.set("https://opensource.org/licenses/MIT")
}
}
developers {
developer {
id.set("kciter")
name.set("Lee Sun-Hyoup")
email.set("[email protected]")
url.set("https://github.com/kciter")
roles.addAll("developer")
timezone.set("Asia/Seoul")
}
}
scm {
connection.set("scm:git:git://github.com/cobaltinc/vortex.git")
developerConnection.set("scm:git:ssh://github.com:cobaltinc/vortex.git")
url.set("https://github.com/cobaltinc/vortex")
}
}
}
}
}
signing {
sign(configurations.archives.get())
sign(publishing.publications["vortex"])
}
dependencyManagement {
imports {
mavenBom("org.springframework.boot:spring-boot-dependencies:2.5.6")
}
}
dependencies {
compileOnly(kotlin("stdlib-jdk8"))
compileOnly(kotlin("reflect"))
compileOnly("org.springframework.boot:spring-boot-starter-webflux")
testImplementation("io.kotest:kotest-runner-junit5:4.6.3")
testImplementation("io.kotest:kotest-framework-engine:4.6.3")
testImplementation("io.projectreactor:reactor-test")
}