-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle.kts
100 lines (87 loc) · 2.69 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
plugins {
`java-library`
`maven-publish`
signing
}
group = "io.github.secretx33"
version = "0.1"
repositories {
mavenCentral()
}
val javaVersion = 11
dependencies {
compileOnly("org.jetbrains:annotations:24.0.1")
compileOnly("org.checkerframework:checker-qual:3.34.0")
}
tasks.test {
useJUnitPlatform()
}
java {
withJavadocJar()
withSourcesJar()
}
tasks.withType<JavaCompile> {
options.apply {
release.set(javaVersion)
encoding = "UTF-8"
}
}
publishing {
publications {
create<MavenPublication>("maven") {
artifactId = rootProject.name
from(components["java"])
versionMapping {
usage("java-api") {
fromResolutionOf("runtimeClasspath")
}
usage("java-runtime") {
fromResolutionResult()
}
}
pom {
name.set(rootProject.name)
description.set("Flexible resource pattern resolution library for Java applications. ")
url.set("https://github.com/SecretX33/path-matching-resource-pattern-resolver")
licenses {
license {
name.set("The Apache License, Version 2.0")
url.set("http://www.apache.org/licenses/LICENSE-2.0.txt")
}
}
developers {
developer {
id.set("secretx33")
name.set("SecretX")
email.set("[email protected]")
}
}
scm {
connection.set("scm:git:git://github.com:SecretX33/path-matching-resource-pattern-resolver.git")
developerConnection.set("scm:git:ssh://github.com:SecretX33/path-matching-resource-pattern-resolver.git")
url.set("https://github.com/SecretX33/path-matching-resource-pattern-resolver")
}
}
}
}
signing {
useGpgCmd()
sign(publishing.publications["maven"])
}
repositories {
maven {
credentials {
username = System.getenv("SONATYPE_USER")
password = System.getenv("SONATYPE_PASSWORD")
}
url = uri("https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/")
}
}
tasks.javadoc {
val options = options as StandardJavadocDocletOptions
if (JavaVersion.current().isJava9Compatible) {
options.addBooleanOption("html5", true)
}
options.addStringOption("Xdoclint:none", "-quiet")
}
}