-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.gradle.kts
113 lines (99 loc) · 3.09 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
import io.insource.build.Publishing
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
id("java")
id("maven")
id("signing")
id("maven-publish")
id("org.jetbrains.kotlin.jvm") version "1.6.0"
id("org.jetbrains.kotlin.plugin.spring") version "1.6.0"
}
tasks.register<Jar>("sourcesJar") {
from(sourceSets.main.get().allSource)
archiveClassifier.set("sources")
}
tasks.register<Jar>("javadocJar") {
from(tasks.javadoc)
archiveClassifier.set("javadoc")
}
publishing {
repositories {
maven {
name = "github"
url = uri("https://maven.pkg.github.com/InSourceSoftware/in-spring-zeromq")
credentials {
username = project.findProperty("servers.github.username")?.toString() ?: System.getenv("GITHUB_USERNAME")
password = project.findProperty("servers.github.password")?.toString() ?: System.getenv("GITHUB_PASSWORD")
}
}
maven {
name = "ossrh"
url = uri("https://oss.sonatype.org/service/local/staging/deploy/maven2/")
credentials {
username = project.findProperty("servers.ossrh.username")?.toString() ?: System.getenv("OSSRH_USERNAME")
password = project.findProperty("servers.ossrh.password")?.toString() ?: System.getenv("OSSRH_PASSWORD")
}
}
}
publications {
create<MavenPublication>("maven") {
groupId = Publishing.groupId
version = Publishing.version
from(components["kotlin"])
artifact(tasks["sourcesJar"])
artifact(tasks["javadocJar"])
pom {
name.set(Publishing.artifactId)
description.set(Publishing.description)
url.set(Publishing.url)
licenses {
license {
name.set(Publishing.license)
url.set(Publishing.licenseUrl)
}
}
developers {
developer {
id.set(Publishing.developerUserName)
name.set(Publishing.developerFullName)
email.set(Publishing.developerEmailAddress)
}
}
scm {
connection.set(Publishing.connectionUrl)
developerConnection.set(Publishing.developerConnectionUrl)
url.set(Publishing.url)
}
}
}
}
}
signing {
sign(publishing.publications["maven"])
}
repositories {
mavenLocal()
mavenCentral()
}
dependencies {
val jzmqApiVersion = "0.2.0"
val springBootVersion = "2.6.0"
implementation(platform("org.springframework.boot:spring-boot-dependencies:$springBootVersion"))
api("org.zeromq:jzmq-api:$jzmqApiVersion")
implementation("org.jetbrains.kotlin:kotlin-reflect")
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
implementation("org.springframework.boot:spring-boot-autoconfigure")
implementation("org.springframework:spring-context")
implementation("javax.annotation:javax.annotation-api")
compileOnly("org.springframework.boot:spring-boot-configuration-processor")
testImplementation("org.springframework.boot:spring-boot-starter-test")
}
tasks.withType<KotlinCompile> {
kotlinOptions {
freeCompilerArgs = listOf("-Xjsr305=strict")
jvmTarget = "11"
}
}
tasks.withType<Test> {
useJUnitPlatform()
}