-
Notifications
You must be signed in to change notification settings - Fork 6
/
build.gradle.kts
41 lines (33 loc) · 1.18 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
allprojects {
group = "com.github.ok2c.hc5"
version = "0.4.1-SNAPSHOT"
repositories {
mavenCentral()
}
extra["releaseVersion"] = !version.toString().endsWith("-SNAPSHOT")
}
subprojects {
tasks.withType<Javadoc> {
(options as StandardJavadocDocletOptions).addBooleanOption("Xdoclint:-missing", true)
}
tasks.withType<JavaCompile> {
options.compilerArgs.add("-Xlint:deprecation")
}
apply<MavenPublishPlugin>()
configure<PublishingExtension> {
val releaseVersion: Boolean by project.extra
repositories {
maven {
val releasesRepoUrl = "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
val snapshotsRepoUrl = "https://oss.sonatype.org/content/repositories/snapshots/"
url = uri(if (releaseVersion) releasesRepoUrl else snapshotsRepoUrl)
if (project.extra.has("ossrh.user")) {
credentials {
username = project.extra["ossrh.user"] as String
password = project.extra["ossrh.password"] as String
}
}
}
}
}
}