-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
102 lines (89 loc) · 3.04 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
plugins {
`java-library`
`maven-publish`
signing
id("io.freefair.lombok") version "8.0.1" apply false
}
allprojects {
group = "io.github.blackbaroness"
version = "1.2.0"
}
subprojects {
apply(plugin = "java-library")
apply(plugin = "maven-publish")
apply(plugin = "signing")
apply(plugin = "io.freefair.lombok")
repositories {
mavenCentral()
}
dependencies {
compileOnly("org.jetbrains:annotations:24.0.1")
compileOnly("org.checkerframework:checker-qual:3.32.0")
testImplementation("org.junit.jupiter:junit-jupiter:5.9.2")
}
java {
val javaVersion = JavaVersion.VERSION_1_8
sourceCompatibility = javaVersion
targetCompatibility = javaVersion
withJavadocJar()
withSourcesJar()
}
publishing {
publications {
create<MavenPublication>("mavenJava") {
from(components["java"])
pom {
name.set(project.name)
description.set(project.name)
url.set("https://github.com/BlackBaroness/fastutil-extender")
developers {
developer {
id.set("blackbaroness")
name.set("BlackBaroness")
email.set("[email protected]")
}
}
licenses {
license {
name.set("The MIT License")
url.set("https://opensource.org/license/mit/")
}
}
scm {
connection.set("scm:git:git://github.com/BlackBaroness/fastutil-extender.git")
developerConnection.set("scm:git:ssh://github.com/BlackBaroness/fastutil-extender.git")
url.set("https://github.com/BlackBaroness/fastutil-extender")
}
}
}
}
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 = System.getProperty("ossrhUsername")
password = System.getProperty("ossrhPassword")
}
}
}
}
signing {
sign(publishing.publications["mavenJava"])
}
tasks {
javadoc {
options.encoding = "UTF-8"
if (JavaVersion.current().isJava9Compatible) {
(options as StandardJavadocDocletOptions).addBooleanOption("html5", true)
}
}
test {
useJUnitPlatform()
}
withType<JavaCompile> {
options.encoding = "UTF-8"
}
}
}