-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
112 lines (99 loc) · 2.37 KB
/
build.gradle.kts
File metadata and controls
112 lines (99 loc) · 2.37 KB
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
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
idea
java
kotlin("jvm") version "1.6.21"
`maven-publish`
signing
}
val javaMajorVersion = "17"
val kotlinTargetVersion = "17"
val pluginGroup = "me.joshlarson"
val pluginName = "websocket"
val pluginVersion = "0.9.6"
project.group = pluginGroup
project.version = pluginVersion
java {
modularity.inferModulePath.set(true)
withJavadocJar()
withSourcesJar()
}
repositories {
mavenCentral()
}
sourceSets {
main {
dependencies {
api(group="org.jetbrains", name="annotations", version="20.1.0")
}
}
test {
dependencies {
testImplementation(kotlin("stdlib"))
testImplementation(group="org.junit.jupiter", name="junit-jupiter-api", version="5.8.1")
testRuntimeOnly(group="org.junit.jupiter", name="junit-jupiter-engine", version="5.8.1")
}
}
}
val compileTestKotlin: KotlinCompile by tasks
compileTestKotlin.kotlinOptions {
jvmTarget = kotlinTargetVersion
}
// Create the publication with the pom configuration:
publishing {
publications {
create<MavenPublication>("websocketPublication") {
groupId = pluginGroup
artifactId = pluginName
version = pluginVersion
from(components["java"])
versionMapping {
usage("java-api") {
fromResolutionOf("runtimeClasspath")
}
usage("java-runtime") {
fromResolutionResult()
}
}
pom {
name.set("websocket")
description.set("A Lightweight Java Websocket Client/Server Wrapper")
url.set("https://github.com/Josh-Larson/java-websocket")
licenses {
license {
name.set("The MIT License")
url.set("https://opensource.org/licenses/MIT")
distribution.set("repo")
}
}
developers {
developer {
id.set("Josh-Larson")
name.set("Josh Larson")
email.set("[email protected]")
}
}
scm {
connection.set("scm:git:git://github.com/Josh-Larson/java-websocket.git")
developerConnection.set("scm:git:ssh://github.com:Josh-Larson/jlcommon.git")
url.set("https://github.com/Josh-Larson/java-websocket")
}
}
}
}
}
tasks {
javadoc {
if (JavaVersion.current().isJava9Compatible) {
(options as StandardJavadocDocletOptions).addBooleanOption("html5", true)
}
}
artifacts {
archives(jar)
archives(getByName("sourcesJar"))
archives(getByName("javadocJar"))
}
signing {
sign(publishing.publications["websocketPublication"])
}
}