Skip to content

Commit

Permalink
Release 1.3.0
Browse files Browse the repository at this point in the history
Closes #14
  • Loading branch information
NotMyFault committed Sep 6, 2021
1 parent 374ffb4 commit a8d529b
Show file tree
Hide file tree
Showing 7 changed files with 78 additions and 61 deletions.
15 changes: 6 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,14 @@ on: ["pull_request", "push"]

jobs:
build:
strategy:
matrix:
java: ["1.8", "11"]
os: ["ubuntu-18.04"]
runs-on: "${{ matrix.os }}"
runs-on: "ubuntu-20.04"
steps:
- name: "Checkout Repository"
uses: "actions/[email protected]"
- name: "Setup JDK ${{ matrix.java }}"
uses: "actions/setup-java@v1.4.3"
- name: "Setup JDK 16"
uses: "actions/setup-java@v2.2.0"
with:
java-version: "${{ matrix.java }}"
distribution: "temurin"
java-version: "16"
- name: "Clean Build"
run: "./gradlew clean build"
run: "./gradlew clean build"
4 changes: 2 additions & 2 deletions .github/workflows/validate-gradle-wrapper.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ on: ["pull_request", "push"]

jobs:
build:
runs-on: "ubuntu-18.04"
runs-on: "ubuntu-20.04"
steps:
- name: "Checkout Repository"
uses: "actions/[email protected]"
- name: "Validate Gradle Wrapper"
uses: "gradle/[email protected].3"
uses: "gradle/[email protected].4"
23 changes: 8 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,36 +14,29 @@ If you are looking for the plugin HeadDatabase, get it [from spigot](https://www

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

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

### Importing via Gradle
### Gradle
```kotlin
repositories {
maven {
name = "HeadDatabase-API"
url = uri("https://mvn.intellectualsites.com/content/groups/public/")
}
mavenCentral()
}

dependencies {
compileOnly("me.arcaniax:HeadDatabase-API:1.2.0")
compileOnly("com.arcaniax:HeadDatabase-API:1.3.0")
}
```

### Importing via Maven
### Maven
```xml
<!-- HeadDatabase-API -->
<repository>
<id>HeadDatabase-API</id>
<url>https://mvn.intellectualsites.com/content/groups/public/</url>
</repository>

<!-- HeadDatabase-API -->
<dependency>
<groupId>me.arcaniax</groupId>
<groupId>com.arcaniax</groupId>
<artifactId>HeadDatabase-API</artifactId>
<version>1.2.0</version>
<version>1.3.0</version>
<scope>provided</scope>
</dependency>
```
Expand Down
88 changes: 57 additions & 31 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,30 +1,46 @@
import org.cadixdev.gradle.licenser.Licenser
import org.cadixdev.gradle.licenser.LicenseExtension

plugins {
id("java")
id("java-library")
id("maven-publish")
java
`java-library`
`maven-publish`
signing

id("org.cadixdev.licenser") version "0.6.1"
}

the<JavaPluginExtension>().toolchain {
languageVersion.set(JavaLanguageVersion.of(8))
java {
toolchain.languageVersion.set(JavaLanguageVersion.of(16))
}

tasks.compileJava.configure {
options.release.set(8)
}

configurations.all {
attributes.attribute(TargetJvmVersion.TARGET_JVM_VERSION_ATTRIBUTE, 16)
}

group = "me.arcaniax"
version = "1.2.1-SNAPSHOT"
group = "com.arcaniax"
version = "1.3.0"

var versuffix by extra("SNAPSHOT")
version = if (!project.hasProperty("release")) {
String.format("%s-%s", project.version, versuffix)
} else {
String.format(project.version as String)
}

repositories {
mavenCentral()
maven {
name = "Spigot"
url = uri("https://hub.spigotmc.org/nexus/content/repositories/snapshots")
name = "PaperMC"
url = uri("https://papermc.io/repo/repository/maven-public/")
}
}

dependencies {
compileOnlyApi("org.spigotmc:spigot-api:1.16.5-R0.1-SNAPSHOT")
compileOnlyApi("io.papermc.paper:paper-api:1.17.1-R0.1-SNAPSHOT")
}

configure<LicenseExtension> {
Expand All @@ -33,23 +49,7 @@ configure<LicenseExtension> {
newLine.set(false)
}

val javadocDir = rootDir.resolve("docs").resolve("javadoc")
tasks {
val assembleTargetDir = create<Copy>("assembleTargetDirectory") {
destinationDir = rootDir.resolve("target")
into(destinationDir)
from(withType<Jar>())
}
named("build") {
dependsOn(assembleTargetDir)
}

named<Delete>("clean") {
doFirst {
rootDir.resolve("target").deleteRecursively()
javadocDir.deleteRecursively()
}
}

compileJava {
options.compilerArgs.addAll(arrayOf("-Xmaxerrs", "1000"))
Expand All @@ -68,7 +68,7 @@ tasks {
"implSpec:a:Implementation Requirements:",
"implNote:a:Implementation Note:"
)
opt.destinationDirectory = javadocDir
opt.links("https://papermc.io/javadocs/paper/1.17/")
}
}

Expand All @@ -77,13 +77,32 @@ java {
withJavadocJar()
}

signing {
if (!version.toString().endsWith("-SNAPSHOT")) {
signing.isRequired
sign(publishing.publications)
}
}

publishing {
publications {
create<MavenPublication>("maven") {
from(components["java"])

pom {

name.set(project.name + " " + project.version)
description.set("The API for Head Database, a Minecraft plugin that allows you to obtain thousands of custom Minecraft skulls that feature unique designs.")
url.set("https://github.com/Arcaniax-Development/HeadDatabase-API")

licenses {
license {
name.set("GNU General Public License, Version 3.0")
url.set("https://www.gnu.org/licenses/gpl-3.0.html")
distribution.set("repo")
}
}

developers {
developer {
id.set("Arcaniax")
Expand All @@ -96,6 +115,11 @@ publishing {
connection.set("scm:https://[email protected]/Arcaniax-Development/HeadDatabase-API.git")
developerConnection.set("scm:git://github.com/Arcaniax-Development/HeadDatabase-API.git")
}

issueManagement {
system.set("GitHub")
url.set("https://github.com/Arcaniax-Development/HeadDatabase-API/issues")
}
}
}
}
Expand All @@ -106,11 +130,13 @@ publishing {
val nexusPassword: String? by project
if (nexusUsername != null && nexusPassword != null) {
maven {
val thirdParty = "https://mvn.intellectualsites.com/content/repositories/thirdparty/"
val snapshotRepositoryUrl = "https://mvn.intellectualsites.com/content/repositories/snapshots/"
val releasesRepositoryUrl =
"https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"
val snapshotRepositoryUrl =
"https://s01.oss.sonatype.org/content/repositories/snapshots/"
url = uri(
if (version.toString().endsWith("-SNAPSHOT")) snapshotRepositoryUrl
else thirdParty
else releasesRepositoryUrl
)

credentials {
Expand Down
3 changes: 2 additions & 1 deletion renovate.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"extends": [
"config:base"
"config:base",
":disableDependencyDashboard"
]
}
2 changes: 1 addition & 1 deletion src/main/java/me/arcaniax/hdb/api/HeadDatabaseAPI.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public class HeadDatabaseAPI {
public void setPrefixID(String prefix) {}

/**
* Checks whether or not a head exists with the given ID
* Checks whether a head exists with the given ID
*
* @param ID The ID to check
* @return true if a head exists with the given ID, otherwise false
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/me/arcaniax/hdb/api/PlayerClickHeadEvent.java
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public String getHeadID() {
}

/**
* @return whether or not economy is in use
* @return whether economy is in use
*/
public boolean isEconomy() {
return this.economy;
Expand All @@ -117,7 +117,7 @@ public ItemStack getHead() {
}

/**
* @return Whether or not something is cancelled
* @return Whether something is cancelled
*/
public boolean isCancelled() {
return this.isCancelled;
Expand Down

0 comments on commit a8d529b

Please sign in to comment.