-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
146 lines (134 loc) · 4.29 KB
/
build.gradle.kts
File metadata and controls
146 lines (134 loc) · 4.29 KB
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
import org.jreleaser.model.Active
plugins {
`java-library`
`maven-publish`
id("org.jreleaser") version "1.23.0"
}
val snapshot = providers.gradleProperty("snapshot").getOrElse("false")
group = "io.github.archipelagomw"
version = "0.2.1" + if("true" == snapshot) "-SNAPSHOT" else ""
repositories {
mavenCentral()
}
dependencies {
testImplementation(libs.junit.jupiter)
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
// Gson is indirectly exposed via slotdata helpers
api(libs.gson)
implementation(libs.java.websocket)
implementation(libs.httpclient)
implementation(libs.httpcore)
}
// Apply a specific Java toolchain to ease working on different environments.
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
withSourcesJar()
withJavadocJar()
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
}
tasks.withType<JavaCompile>().configureEach {
options.release = 8
}
tasks.named<Test>("test") {
// Use JUnit Platform for unit tests.
useJUnitPlatform()
}
tasks.named<Javadoc>("javadoc") {
options {
(this as CoreJavadocOptions).addBooleanOption("Xdoclint:none", true)
}
}
publishing {
publications {
create<MavenPublication>("javaClient") {
from(components["java"])
repositories {
// For the time being
mavenLocal()
maven {
url = uri(layout.buildDirectory.dir("staging-deploy"))
}
}
pom {
name = "Archipelago Java Library"
description = "Java library to connect to an Archipelago Server"
url = "https://github.com/ArchipelagoMW/Java-Client"
scm {
connection = "scm:git://github.com/ArchipelagoMW/Java-Client"
developerConnection = "scm:git:https://github.com/ArchipelagoMW/Java-Client.git"
url = "https://github.com/ArchipelagoMW/Java-Client"
}
inceptionYear = "2021"
licenses {
license {
name = "MIT License"
url = "https://github.com/ArchipelagoMW/Java-Client/blob/main/LICENSE"
distribution = "repo"
}
}
developers {
developer {
name = "PlatanoBailando"
email = "cjmang@gmail.com"
}
developer {
name = "digiholic"
}
}
contributors {
contributor {
name = "Kono Tyran"
roles.add("Author")
}
contributor {
name = "mattman107"
}
contributor {
name = "charlesfire"
}
}
}
}
}
}
jreleaser {
signing {
active = Active.ALWAYS
armored = true
}
release {
github {
enabled = true
repoOwner = "ArchipelagoMW"
overwrite = false
skipRelease = true
}
}
deploy {
maven {
mavenCentral {
register("release-deploy") {
// Releases intended to be turned on via environment variable
applyMavenCentralRules = true
url = "https://central.sonatype.com/api/v1/publisher"
stagingRepository("build/staging-deploy")
}
}
nexus2 {
register("snapshot-deploy") {
active = Active.SNAPSHOT
applyMavenCentralRules = true
snapshotSupported = true
closeRepository = true
releaseRepository = true
url = "https://central.sonatype.com/api/v1/publisher"
snapshotUrl = "https://central.sonatype.com/repository/maven-snapshots/"
stagingRepository("build/staging-deploy")
}
}
}
}
}