forked from HQKTech/jdwp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
91 lines (82 loc) · 2.08 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
plugins {
`java-library`
`maven-publish`
signing
}
repositories {
mavenLocal()
mavenCentral()
}
dependencies {
}
group = "io.github.skylot"
version = System.getenv("JDWP_VERSION") ?: "dev"
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
withJavadocJar()
withSourcesJar()
}
publishing {
publications {
create<MavenPublication>("mavenJava") {
artifactId = "jdwp"
from(components["java"])
versionMapping {
usage("java-api") {
fromResolutionOf("runtimeClasspath")
}
usage("java-runtime") {
fromResolutionResult()
}
}
pom {
name.set("jdwp")
description.set("A library for encoding & decoding JDWP packets. ")
url.set("https://github.com/skylot/jdwp")
licenses {
license {
name.set("MIT License")
url.set("http://www.opensource.org/licenses/mit-license.php")
}
}
developers {
developer {
id.set("skylot")
name.set("Skylot")
email.set("[email protected]")
url.set("https://github.com/skylot")
}
}
scm {
connection.set("scm:git:git://github.com/skylot/jdwp.git")
developerConnection.set("scm:git:ssh://github.com:skylot/jdwp.git")
url.set("https://github.com/skylot/jdwp")
}
}
}
}
repositories {
maven {
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
credentials {
username = project.properties["ossrhUser"].toString()
password = project.properties["ossrhPassword"].toString()
}
}
}
}
signing {
isRequired = gradle.taskGraph.hasTask("publish")
sign(publishing.publications["mavenJava"])
}
tasks.javadoc {
val stdOptions = options as StandardJavadocDocletOptions
if (JavaVersion.current().isJava9Compatible) {
stdOptions.addBooleanOption("html5", true)
}
// disable 'missing' warnings
stdOptions.addStringOption("Xdoclint:all,-missing", "-quiet")
}