Skip to content

Commit

Permalink
Release 1.1.17 (#123)
Browse files Browse the repository at this point in the history
* Velocity 266+ support
* 1.20.2 support
* Automatically generate mappings
---------

Co-authored-by: jnngl <[email protected]>
Co-authored-by: UserNugget <[email protected]>
Co-authored-by: Petr Ilin <[email protected]>
  • Loading branch information
4 people authored Dec 11, 2023
1 parent fe53873 commit c1c9916
Show file tree
Hide file tree
Showing 41 changed files with 272,362 additions and 361,524 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
uses: actions/[email protected]
with:
distribution: adopt
java-version: 11
java-version: 17
- name: Build LimboAPI
run: ./gradlew build
- name: Upload LimboAPI
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
uses: actions/[email protected]
with:
distribution: adopt
java-version: 11
java-version: 17
- name: Build LimboAPI
run: ./gradlew build
- name: Upload LimboAPI
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Test server: [``ely.su``](https://hotmc.ru/minecraft-server-203216)
<dependency>
<groupId>net.elytrium.limboapi</groupId>
<artifactId>api</artifactId>
<version>1.1.16</version>
<version>1.1.17</version>
<scope>provided</scope>
</dependency>
</dependencies>
Expand All @@ -70,7 +70,7 @@ Test server: [``ely.su``](https://hotmc.ru/minecraft-server-203216)
}
dependencies {
compileOnly("net.elytrium.limboapi:api:1.1.16")
compileOnly("net.elytrium.limboapi:api:1.1.17")
}
```

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.1.16
1.1.17
60 changes: 30 additions & 30 deletions api/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@ plugins {
id("maven-publish")
}

dependencies {
compileJava() {
getOptions().getRelease().set(11)
getOptions().setEncoding("UTF-8")
}

dependencies() {
compileOnly("com.velocitypowered:velocity-api:$velocityVersion")
api("net.elytrium.commons:config:$elytriumCommonsVersion")
api("net.elytrium.commons:utils:$elytriumCommonsVersion")
Expand All @@ -14,44 +19,41 @@ dependencies {
api("net.kyori:adventure-nbt:$adventureVersion")

compileOnly("com.github.spotbugs:spotbugs-annotations:$spotbugsVersion")

annotationProcessor("net.java.dev.jna:jna-platform:5.13.0")
annotationProcessor("com.github.bsideup.jabel:jabel-javac-plugin:1.0.0")
}

license {
license() {
matching(includes: ["**/mcprotocollib/**"]) {
setHeader(getRootProject().file("HEADER_MCPROTOCOLLIB.txt"))
header = rootProject.file("HEADER_MCPROTOCOLLIB.txt")
}

setHeader(file("HEADER.txt"))
}

task javadocJar(type: Jar) {
getArchiveClassifier().set("javadoc")
from(javadoc)
header = file("HEADER.txt")
}

javadoc {
MinimalJavadocOptions options = getOptions()
javadoc() {
options.setEncoding("UTF-8")
options.setCharSet("UTF-8")
// Mark sources as Java 11 source compatible.
options.setSource("11")
options.links("https://docs.oracle.com/en/java/javase/11/docs/api/", "https://jd.adventure.kyori.net/nbt/4.11.0/")

options.links("https://docs.oracle.com/en/java/javase/11/docs/api/")
options.addStringOption("Xdoclint:none", "-quiet")

// Remove "undefined" from search paths when generating javadoc for a non-modular project. (JDK-8215291)
if (JavaVersion.current() == JavaVersion.VERSION_11) {
if (JavaVersion.current() >= JavaVersion.VERSION_1_9 && JavaVersion.current() < JavaVersion.VERSION_12) {
options.addBooleanOption("-no-module-directories", true)
}
}

task sourcesJar(type: Jar) {
getArchiveClassifier().set("sources")
tasks.register("sourcesJar", Jar) {
archiveClassifier = "sources"
from(sourceSets.main.getAllSource())
}

publishing {
repositories {
tasks.register("javadocJar", Jar) {
archiveClassifier = "javadoc"
from(javadoc)
}

publishing() {
repositories() {
maven {
credentials {
setUsername(System.getenv("PUBLISH_USERNAME"))
Expand All @@ -63,22 +65,20 @@ publishing {
}
}

publications {
maven(MavenPublication) {
from(components.java)
publications.create("publication", MavenPublication) {
from(components.java)

artifact(javadocJar)
artifact(sourcesJar)
}
artifact(javadocJar)
artifact(sourcesJar)
}
}

artifacts {
artifacts() {
archives(javadocJar)
archives(sourcesJar)
}

sourceSets.main.getJava().srcDir(
sourceSets.main.java.srcDir(
getTasks().register("generateTemplates", Copy) {
task -> {
String version = getVersion().contains("-") ? "${getVersion()} (git-${getCurrentShortRevision()})" : getVersion()
Expand Down
17 changes: 17 additions & 0 deletions api/src/main/java/net/elytrium/limboapi/api/LimboFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,23 @@ public interface LimboFactory {
*/
PreparedPacket createPreparedPacket(ProtocolVersion minVersion, ProtocolVersion maxVersion);

/**
* Creates new prepared packet builder for the CONFIG state.
*
* @return new prepared packet.
*/
PreparedPacket createConfigPreparedPacket();

/**
* Creates new prepared packet builder for the CONFIG state.
*
* @param minVersion Minimum version to prepare.
* @param maxVersion Maximum version to prepare.
*
* @return new prepared packet.
*/
PreparedPacket createConfigPreparedPacket(ProtocolVersion minVersion, ProtocolVersion maxVersion);

/**
* Registers self-made packet.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ default void onSpawn(Limbo server, LimboPlayer player) {

}

default void onConfig(Limbo server, LimboPlayer player) {

}

default void onMove(double posX, double posY, double posZ) {

}
Expand Down
53 changes: 24 additions & 29 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,60 +1,55 @@
//file:noinspection GroovyAssignabilityCheck

plugins {
plugins() {
id("java")

id("checkstyle")
id("com.github.spotbugs").version("5.0.7").apply(false)
id("com.github.spotbugs").version("5.0.14").apply(false)
id("org.cadixdev.licenser").version("0.6.1").apply(false)
}

allprojects {
allprojects() {
apply(plugin: "checkstyle")
apply(plugin: "com.github.spotbugs")
apply(plugin: "org.cadixdev.licenser")

setGroup("net.elytrium.limboapi")
setVersion("1.1.17-SNAPSHOT")

compileJava {
getOptions().setEncoding("UTF-8")
}
setVersion("1.1.17")

java {
setSourceCompatibility(JavaVersion.VERSION_11)
setTargetCompatibility(JavaVersion.VERSION_11)
compileJava() {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}

repositories {
repositories() {
mavenCentral()

maven {
maven() {
setName("elytrium-repo")
setUrl("https://maven.elytrium.net/repo/")
}
maven {
maven() {
setName("papermc-repo")
setUrl("https://papermc.io/repo/repository/maven-public/")
}
}

checkstyle {
setToolVersion("10.3")
setConfigFile(file("${this.getRootDir()}/config/checkstyle/checkstyle.xml"))
setConfigProperties("configDirectory": "${this.getRootDir()}/config/checkstyle")
setMaxErrors(0)
setMaxWarnings(0)
checkstyle() {
toolVersion = "10.12.1"
configFile = file("$rootDir/config/checkstyle/checkstyle.xml")
configProperties = ["configDirectory": "$rootDir/config/checkstyle"]
maxErrors = 0
maxWarnings = 0
}

spotbugs {
setExcludeFilter(file("${this.getRootDir()}/config/spotbugs/suppressions.xml"))
}
spotbugs() {
excludeFilter = file("${this.getRootDir()}/config/spotbugs/suppressions.xml")

spotbugsMain {
reports {
html {
getRequired().set(true)
getOutputLocation().set(file("${this.getBuildDir()}/reports/spotbugs/main/spotbugs.html"))
setStylesheet("fancy-hist.xsl")
if (this.project != rootProject) {
reports.register("html") {
required = true
outputLocation.value(layout.buildDirectory.file("reports/spotbugs/main/spotbugs.html"))
stylesheet = "fancy-hist.xsl"
}
}
}
Expand Down
4 changes: 3 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
fastPrepareVersion=1.0.7
org.gradle.jvmargs=-Xmx4096m
fastPrepareVersion=1.0.8
velocityVersion=3.2.0-SNAPSHOT
nettyVersion=4.1.86.Final
fastutilVersion=8.5.11
bstatsVersion=3.0.0
spotbugsVersion=4.7.3
elytriumCommonsVersion=1.2.3
adventureVersion=4.12.0
manifestUrl=https://launchermeta.mojang.com/mc/game/version_manifest.json
Loading

0 comments on commit c1c9916

Please sign in to comment.