-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle.kts
165 lines (141 loc) · 4.91 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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
import com.diffplug.gradle.spotless.SpotlessPlugin
import java.net.URI
plugins {
java
`java-library`
`maven-publish`
signing
alias(libs.plugins.spotless)
alias(libs.plugins.nexus)
idea
eclipse
}
java {
toolchain.languageVersion.set(JavaLanguageVersion.of(17))
}
tasks.compileJava.configure {
options.release.set(11)
}
configurations.all {
attributes.attribute(TargetJvmVersion.TARGET_JVM_VERSION_ATTRIBUTE, 17)
}
group = "com.intellectualsites.paster"
version = "1.1.7-SNAPSHOT"
repositories {
mavenCentral()
}
dependencies {
implementation(platform("com.intellectualsites.bom:bom-1.16.x:1.52"))
compileOnly("com.google.code.gson:gson")
compileOnly("com.google.guava:guava")
compileOnly(libs.findbugs)
}
spotless {
java {
licenseHeaderFile(rootProject.file("HEADER.txt"))
target("**/*.java")
}
}
tasks {
compileJava {
options.compilerArgs.addAll(arrayOf("-Xmaxerrs", "1000"))
options.compilerArgs.add("-Xlint:all")
for (disabledLint in arrayOf("processing", "path", "fallthrough", "serial"))
options.compilerArgs.add("-Xlint:$disabledLint")
options.isDeprecation = true
options.encoding = "UTF-8"
options.release.set(11)
}
javadoc {
title = project.name + " " + project.version
val opt = options as StandardJavadocDocletOptions
opt.addStringOption("Xdoclint:none", "-quiet")
opt.tags(
"apiNote:a:API Note:",
"implSpec:a:Implementation Requirements:",
"implNote:a:Implementation Note:"
)
opt.links("https://javadoc.io/doc/com.google.code.findbugs/jsr305/3.0.2/")
opt.noTimestamp()
}
withType<AbstractArchiveTask>().configureEach {
isPreserveFileTimestamps = false
isReproducibleFileOrder = true
}
}
java {
withSourcesJar()
withJavadocJar()
}
signing {
if (!project.hasProperty("skip.signing") && !version.toString().endsWith("-SNAPSHOT")) {
val signingKey: String? by project
val signingPassword: String? by project
useInMemoryPgpKeys(signingKey, signingPassword)
signing.isRequired
sign(publishing.publications)
}
}
publishing {
publications {
create<MavenPublication>("maven") {
from(components["java"])
pom {
name.set(project.name + " " + project.version)
description.set("A library focused on collecting and assembling debug data provided from the jvm as json.")
url.set("https://github.com/IntellectualSites/Paster")
licenses {
license {
name.set("GNU General Public License, Version 3.0")
url.set("https://www.gnu.org/licenses/gpl-3.0.html")
distribution.set("repo")
}
}
developers {
developer {
id.set("Sauilitired")
name.set("Alexander Söderberg")
organization.set("IntellectualSites")
organizationUrl.set("https://github.com/IntellectualSites/")
}
developer {
id.set("NotMyFault")
name.set("Alexander Brandes")
organization.set("IntellectualSites")
email.set("contact(at)notmyfault.dev")
}
developer {
id.set("SirYwell")
name.set("Hannes Greule")
organization.set("IntellectualSites")
organizationUrl.set("https://github.com/IntellectualSites/")
}
developer {
id.set("dordsor21")
name.set("dordsor21")
organization.set("IntellectualSites")
organizationUrl.set("https://github.com/IntellectualSites/")
}
}
scm {
url.set("https://github.com/IntellectualSites/Paster")
connection.set("scm:git:https://github.com/IntellectualSites/Paster.git")
developerConnection.set("scm:git:git@github.com:IntellectualSites/Paster.git")
tag.set("${project.version}")
}
issueManagement{
system.set("GitHub")
url.set("https://github.com/IntellectualSites/Paster/issues")
}
}
}
}
}
nexusPublishing {
this.repositories {
sonatype {
nexusUrl.set(URI.create("https://s01.oss.sonatype.org/service/local/"))
snapshotRepositoryUrl.set(URI.create("https://s01.oss.sonatype.org/content/repositories/snapshots/"))
}
}
}