-
Notifications
You must be signed in to change notification settings - Fork 11
/
build.gradle.kts
117 lines (93 loc) · 3.06 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
plugins {
`java-library`
`maven-publish`
signing
alias(libs.plugins.nexuspublish)
}
group = "dev.hollowcube"
version = System.getenv("TAG_VERSION") ?: "dev"
description = "Fast and small world format for Minestom"
repositories {
mavenLocal()
mavenCentral()
maven(url = "https://jitpack.io")
}
dependencies {
val minestom = libs.minestom
compileOnly(minestom)
implementation(libs.zstd)
// Fastutil is only included because minestom already uses it, otherwise it is a crazy dependency
// for how it is used in this project.
implementation(libs.fastutil)
testImplementation("ch.qos.logback:logback-core:1.4.7")
testImplementation("ch.qos.logback:logback-classic:1.4.7")
testImplementation(platform("org.junit:junit-bom:5.9.1"))
testImplementation("org.junit.jupiter:junit-jupiter")
testImplementation(minestom)
}
java {
withSourcesJar()
withJavadocJar()
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
}
tasks.test {
maxHeapSize = "2g"
useJUnitPlatform()
}
nexusPublishing {
this.packageGroup.set("dev.hollowcube")
repositories.sonatype {
nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/"))
snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/"))
if (System.getenv("SONATYPE_USERNAME") != null) {
username.set(System.getenv("SONATYPE_USERNAME"))
password.set(System.getenv("SONATYPE_PASSWORD"))
}
}
}
publishing.publications.create<MavenPublication>("maven") {
groupId = "dev.hollowcube"
artifactId = "polar"
version = project.version.toString()
from(project.components["java"])
pom {
name.set(artifactId)
description.set(project.description)
url.set("https://github.com/hollow-cube/polar")
licenses {
license {
name.set("MIT")
url.set("https://github.com/hollow-cube/polar/blob/main/LICENSE")
}
}
developers {
developer {
id.set("mworzala")
name.set("Matt Worzala")
email.set("[email protected]")
}
}
issueManagement {
system.set("GitHub")
url.set("https://github.com/hollow-cube/polar/issues")
}
scm {
connection.set("scm:git:git://github.com/hollow-cube/polar.git")
developerConnection.set("scm:git:[email protected]:hollow-cube/polar.git")
url.set("https://github.com/hollow-cube/polar")
tag.set(System.getenv("TAG_VERSION") ?: "HEAD")
}
ciManagement {
system.set("Github Actions")
url.set("https://github.com/hollow-cube/polar/actions")
}
}
}
signing {
isRequired = System.getenv("CI") != null
val privateKey = System.getenv("GPG_PRIVATE_KEY")
val keyPassphrase = System.getenv()["GPG_PASSPHRASE"]
useInMemoryPgpKeys(privateKey, keyPassphrase)
sign(publishing.publications)
}