Skip to content

Commit a8d529b

Browse files
committed
Release 1.3.0
Closes #14
1 parent 374ffb4 commit a8d529b

File tree

7 files changed

+78
-61
lines changed

7 files changed

+78
-61
lines changed

.github/workflows/build.yml

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,14 @@ on: ["pull_request", "push"]
44

55
jobs:
66
build:
7-
strategy:
8-
matrix:
9-
java: ["1.8", "11"]
10-
os: ["ubuntu-18.04"]
11-
runs-on: "${{ matrix.os }}"
7+
runs-on: "ubuntu-20.04"
128
steps:
139
- name: "Checkout Repository"
1410
uses: "actions/checkout@v2.3.4"
15-
- name: "Setup JDK ${{ matrix.java }}"
16-
uses: "actions/setup-java@v1.4.3"
11+
- name: "Setup JDK 16"
12+
uses: "actions/setup-java@v2.2.0"
1713
with:
18-
java-version: "${{ matrix.java }}"
14+
distribution: "temurin"
15+
java-version: "16"
1916
- name: "Clean Build"
20-
run: "./gradlew clean build"
17+
run: "./gradlew clean build"

.github/workflows/validate-gradle-wrapper.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ on: ["pull_request", "push"]
44

55
jobs:
66
build:
7-
runs-on: "ubuntu-18.04"
7+
runs-on: "ubuntu-20.04"
88
steps:
99
- name: "Checkout Repository"
1010
uses: "actions/checkout@v2.3.4"
1111
- name: "Validate Gradle Wrapper"
12-
uses: "gradle/wrapper-validation-action@v1.0.3"
12+
uses: "gradle/wrapper-validation-action@v1.0.4"

README.md

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -14,36 +14,29 @@ If you are looking for the plugin HeadDatabase, get it [from spigot](https://www
1414

1515
* [Discord](https://discord.gg/jpRVrjd)
1616
* [Issues](https://github.com/Arcaniax-Development/HeadDatabase-API/issues)
17+
* [JavaDocs](https://javadoc.io/doc/com.arcaniax/HeadDatabase-API)
1718

1819
## How to use the API
20+
Releases are published to the central repository, snapshots are published to S01 OSS Sonatype.
1921

20-
### Importing via Gradle
22+
### Gradle
2123
```kotlin
2224
repositories {
23-
maven {
24-
name = "HeadDatabase-API"
25-
url = uri("https://mvn.intellectualsites.com/content/groups/public/")
26-
}
25+
mavenCentral()
2726
}
2827

2928
dependencies {
30-
compileOnly("me.arcaniax:HeadDatabase-API:1.2.0")
29+
compileOnly("com.arcaniax:HeadDatabase-API:1.3.0")
3130
}
3231
```
3332

34-
### Importing via Maven
33+
### Maven
3534
```xml
36-
<!-- HeadDatabase-API -->
37-
<repository>
38-
<id>HeadDatabase-API</id>
39-
<url>https://mvn.intellectualsites.com/content/groups/public/</url>
40-
</repository>
41-
4235
<!-- HeadDatabase-API -->
4336
<dependency>
44-
<groupId>me.arcaniax</groupId>
37+
<groupId>com.arcaniax</groupId>
4538
<artifactId>HeadDatabase-API</artifactId>
46-
<version>1.2.0</version>
39+
<version>1.3.0</version>
4740
<scope>provided</scope>
4841
</dependency>
4942
```

build.gradle.kts

Lines changed: 57 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,46 @@
1-
import org.cadixdev.gradle.licenser.Licenser
21
import org.cadixdev.gradle.licenser.LicenseExtension
32

43
plugins {
5-
id("java")
6-
id("java-library")
7-
id("maven-publish")
4+
java
5+
`java-library`
6+
`maven-publish`
7+
signing
8+
89
id("org.cadixdev.licenser") version "0.6.1"
910
}
1011

11-
the<JavaPluginExtension>().toolchain {
12-
languageVersion.set(JavaLanguageVersion.of(8))
12+
java {
13+
toolchain.languageVersion.set(JavaLanguageVersion.of(16))
14+
}
15+
16+
tasks.compileJava.configure {
17+
options.release.set(8)
18+
}
19+
20+
configurations.all {
21+
attributes.attribute(TargetJvmVersion.TARGET_JVM_VERSION_ATTRIBUTE, 16)
1322
}
1423

15-
group = "me.arcaniax"
16-
version = "1.2.1-SNAPSHOT"
24+
group = "com.arcaniax"
25+
version = "1.3.0"
26+
27+
var versuffix by extra("SNAPSHOT")
28+
version = if (!project.hasProperty("release")) {
29+
String.format("%s-%s", project.version, versuffix)
30+
} else {
31+
String.format(project.version as String)
32+
}
1733

1834
repositories {
1935
mavenCentral()
2036
maven {
21-
name = "Spigot"
22-
url = uri("https://hub.spigotmc.org/nexus/content/repositories/snapshots")
37+
name = "PaperMC"
38+
url = uri("https://papermc.io/repo/repository/maven-public/")
2339
}
2440
}
2541

2642
dependencies {
27-
compileOnlyApi("org.spigotmc:spigot-api:1.16.5-R0.1-SNAPSHOT")
43+
compileOnlyApi("io.papermc.paper:paper-api:1.17.1-R0.1-SNAPSHOT")
2844
}
2945

3046
configure<LicenseExtension> {
@@ -33,23 +49,7 @@ configure<LicenseExtension> {
3349
newLine.set(false)
3450
}
3551

36-
val javadocDir = rootDir.resolve("docs").resolve("javadoc")
3752
tasks {
38-
val assembleTargetDir = create<Copy>("assembleTargetDirectory") {
39-
destinationDir = rootDir.resolve("target")
40-
into(destinationDir)
41-
from(withType<Jar>())
42-
}
43-
named("build") {
44-
dependsOn(assembleTargetDir)
45-
}
46-
47-
named<Delete>("clean") {
48-
doFirst {
49-
rootDir.resolve("target").deleteRecursively()
50-
javadocDir.deleteRecursively()
51-
}
52-
}
5353

5454
compileJava {
5555
options.compilerArgs.addAll(arrayOf("-Xmaxerrs", "1000"))
@@ -68,7 +68,7 @@ tasks {
6868
"implSpec:a:Implementation Requirements:",
6969
"implNote:a:Implementation Note:"
7070
)
71-
opt.destinationDirectory = javadocDir
71+
opt.links("https://papermc.io/javadocs/paper/1.17/")
7272
}
7373
}
7474

@@ -77,13 +77,32 @@ java {
7777
withJavadocJar()
7878
}
7979

80+
signing {
81+
if (!version.toString().endsWith("-SNAPSHOT")) {
82+
signing.isRequired
83+
sign(publishing.publications)
84+
}
85+
}
86+
8087
publishing {
8188
publications {
8289
create<MavenPublication>("maven") {
8390
from(components["java"])
8491

8592
pom {
8693

94+
name.set(project.name + " " + project.version)
95+
description.set("The API for Head Database, a Minecraft plugin that allows you to obtain thousands of custom Minecraft skulls that feature unique designs.")
96+
url.set("https://github.com/Arcaniax-Development/HeadDatabase-API")
97+
98+
licenses {
99+
license {
100+
name.set("GNU General Public License, Version 3.0")
101+
url.set("https://www.gnu.org/licenses/gpl-3.0.html")
102+
distribution.set("repo")
103+
}
104+
}
105+
87106
developers {
88107
developer {
89108
id.set("Arcaniax")
@@ -96,6 +115,11 @@ publishing {
96115
connection.set("scm:https://Arcaniax-Development@github.com/Arcaniax-Development/HeadDatabase-API.git")
97116
developerConnection.set("scm:git://github.com/Arcaniax-Development/HeadDatabase-API.git")
98117
}
118+
119+
issueManagement {
120+
system.set("GitHub")
121+
url.set("https://github.com/Arcaniax-Development/HeadDatabase-API/issues")
122+
}
99123
}
100124
}
101125
}
@@ -106,11 +130,13 @@ publishing {
106130
val nexusPassword: String? by project
107131
if (nexusUsername != null && nexusPassword != null) {
108132
maven {
109-
val thirdParty = "https://mvn.intellectualsites.com/content/repositories/thirdparty/"
110-
val snapshotRepositoryUrl = "https://mvn.intellectualsites.com/content/repositories/snapshots/"
133+
val releasesRepositoryUrl =
134+
"https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"
135+
val snapshotRepositoryUrl =
136+
"https://s01.oss.sonatype.org/content/repositories/snapshots/"
111137
url = uri(
112138
if (version.toString().endsWith("-SNAPSHOT")) snapshotRepositoryUrl
113-
else thirdParty
139+
else releasesRepositoryUrl
114140
)
115141

116142
credentials {

renovate.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"extends": [
3-
"config:base"
3+
"config:base",
4+
":disableDependencyDashboard"
45
]
56
}

src/main/java/me/arcaniax/hdb/api/HeadDatabaseAPI.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public class HeadDatabaseAPI {
4444
public void setPrefixID(String prefix) {}
4545

4646
/**
47-
* Checks whether or not a head exists with the given ID
47+
* Checks whether a head exists with the given ID
4848
*
4949
* @param ID The ID to check
5050
* @return true if a head exists with the given ID, otherwise false

src/main/java/me/arcaniax/hdb/api/PlayerClickHeadEvent.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ public String getHeadID() {
9696
}
9797

9898
/**
99-
* @return whether or not economy is in use
99+
* @return whether economy is in use
100100
*/
101101
public boolean isEconomy() {
102102
return this.economy;
@@ -117,7 +117,7 @@ public ItemStack getHead() {
117117
}
118118

119119
/**
120-
* @return Whether or not something is cancelled
120+
* @return Whether something is cancelled
121121
*/
122122
public boolean isCancelled() {
123123
return this.isCancelled;

0 commit comments

Comments
 (0)