Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MC 1.20 Overview #2458

Closed
wants to merge 29 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
621edbd
new smithing recipe requires template
Faithcaio May 23, 2023
d532bf6
signs now have a backside API/Impl is WIP
Faithcaio May 23, 2023
6bba15d
API11
Faithcaio Jun 7, 2023
89ea761
generate API Data
Faithcaio Jun 9, 2023
e1f959d
add SignText color and ChangeSignEvent front/back side
Faithcaio Jun 9, 2023
ccee254
Merge branch 'api-10' into api-11
ImMorpheus Aug 26, 2023
a004b9f
generate api data
ImMorpheus Aug 28, 2023
0a47d5d
MC 1.20.2 API breaks
Faithcaio Sep 28, 2023
eb1faca
bump dependencies used by vanilla minecraft
Faithcaio Oct 3, 2023
cd1da78
use advancement key for command selectors
Faithcaio Oct 4, 2023
82bc09c
Merge remote-tracking branch 'origin/api-10' into api-11
Faithcaio Oct 4, 2023
2f9bcf6
Merge remote-tracking branch 'origin/api-10' into api-11
Faithcaio Oct 4, 2023
c69116c
Merge remote-tracking branch 'origin/api-10' into api-11
Faithcaio Oct 13, 2023
08791f8
Regenerate API data (#2470)
ImMorpheus Nov 11, 2023
2aefdb6
Merge remote-tracking branch 'upstream/api-10' into api-11
ImMorpheus Nov 11, 2023
e812aca
Merge remote-tracking branch 'upstream/api-10' into api-11
ImMorpheus Nov 12, 2023
177cd80
Bump to gradle 8.4 (#2471)
ImMorpheus Nov 12, 2023
925b932
Stop marking sniffer as experimental api (#2474)
ImMorpheus Nov 12, 2023
8892083
Fix dependency conflicts (#2473)
ImMorpheus Nov 12, 2023
06b6318
Fix errorprone warnings and remove printstacktrace (#2475)
ImMorpheus Nov 12, 2023
fe7d8de
Bump additional dependencies (#2476)
ImMorpheus Nov 12, 2023
f578181
Add missing particle options (#2477)
ImMorpheus Nov 17, 2023
3141631
Allow negative amplifiers in potion effects (#2478)
ImMorpheus Nov 18, 2023
ac8aa2b
Add DataHolder.Mutable to chunk
aromaa Dec 7, 2023
92619ec
Build cleanup (#2482)
zml2008 Jan 27, 2024
05c0138
fix recipes
Faithcaio Nov 22, 2023
92b85c1
fix advancement trigger registry
Faithcaio Nov 24, 2023
c91c238
[breaking] Scoreboard API for 1.20.4
Faithcaio Nov 25, 2023
ef584a5
BuiltIn Registries
Faithcaio Dec 5, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
156 changes: 81 additions & 75 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,125 +1,135 @@
import net.ltgt.gradle.errorprone.errorprone
import org.jetbrains.gradle.ext.delegateActions
import org.jetbrains.gradle.ext.settings
import org.jetbrains.gradle.ext.taskTriggers

buildscript {
dependencies {
classpath("fr.inria.gforge.spoon:spoon-core:10.2.0") // bump for EIG
classpath(libs.spoon) // bump for EIG
}
}

plugins {
eclipse
id("org.spongepowered.gradle.sponge.dev")
id("net.kyori.indra.checkstyle")
id("net.kyori.indra.crossdoc")
id("net.kyori.indra.publishing")
id("net.kyori.indra.publishing.sonatype")
id("org.spongepowered.gradle.event-impl-gen")
id("org.jetbrains.gradle.plugin.idea-ext")
id("net.ltgt.errorprone")
}

repositories {
maven("https://repo.spongepowered.org/repository/maven-public/") {
name = "sponge"
}
alias(libs.plugins.spongeGradle.convention)
alias(libs.plugins.indra.checkstyle)
alias(libs.plugins.indra.crossdoc)
alias(libs.plugins.indra.publishing)
alias(libs.plugins.indra.publishing.sonatype)
alias(libs.plugins.eventImplGen)
alias(libs.plugins.ideaExt)
alias(libs.plugins.errorprone)
alias(libs.plugins.nexusPublish)
}

val javaTarget: String by project
val ap by sourceSets.registering {
compileClasspath += sourceSets.main.get().compileClasspath + sourceSets.main.get().output
}

configurations {
sequenceOf(apiElements, runtimeElements).forEach {
it.configure {
exclude(group = "org.jetbrains", module = "annotations")
}
}
}

// Project dependencies
val adventureVersion: String by project
val configurateVersion: String by project
val gsonVersion: String by project
val log4jVersion: String by project
val mathVersion: String by project
dependencies {
val caffeineVersion: String by project
val errorproneVersion: String by project
val junitVersion: String by project
val mockitoVersion: String by project
val pluginSpiVersion: String by project

// Directly tied to what's available from Minecraft
api("org.apache.logging.log4j:log4j-api:$log4jVersion")
api("com.google.code.gson:gson:$gsonVersion")
api(libs.log4j.api)
api(libs.gson)

// Adventure
api(platform("net.kyori:adventure-bom:$adventureVersion"))
api("net.kyori:adventure-api")
api("net.kyori:adventure-text-serializer-gson") {
api(platform(libs.adventure.bom))
api(libs.adventure.api)
api(libs.adventure.textSerializer.gson) {
exclude(group = "com.google.code.gson", module = "gson")
exclude(group = "net.kyori", module = "adventure-api")
}
api("net.kyori:adventure-text-serializer-legacy") {
api(libs.adventure.textSerializer.legacy) {
exclude(group = "net.kyori", module = "adventure-api")
}
api("net.kyori:adventure-text-serializer-plain") {
api(libs.adventure.textSerializer.plain) {
exclude(group = "net.kyori", module = "adventure-api")
}
api("net.kyori:adventure-text-minimessage") {
api(libs.adventure.minimessage) {
exclude(group = "net.kyori", module = "adventure-api")
}

// Dependency injection
api("com.google.inject:guice:5.0.1") {
exclude(group ="com.google.code.findbugs", module = "jsr305") // We don't want to use jsr305, use checkerframework
api(libs.guice) {
exclude(group = "com.google.code.findbugs", module = "jsr305") // We don't want to use jsr305, use checkerframework
exclude(group = "javax.inject", module = "javax.inject")
exclude(group = "com.google.guava", module = "guava") // We use an older version than Guice does
exclude(group = "org.ow2.asm", module = "asm")
}

// High performance cache + guava - shaded guava
api("com.github.ben-manes.caffeine:caffeine:$caffeineVersion") {
exclude(group= "org.checkerframework", module = "checker-qual")
api(libs.caffeine) {
exclude(group = "org.checkerframework", module = "checker-qual")
exclude(group = "com.google.errorprone", module = "error_prone_annotations")
exclude(group = "org.junit", module = "junit-bom")
exclude(group = "org.yaml", module = "snakeyaml")
exclude(group = "com.fasterxml.jackson", module = "jackson-bom")
exclude(group = "org.ow2.asm", module = "asm-bom")
}

// Plugin spi, includes plugin-meta
api("org.spongepowered:plugin-spi:$pluginSpiVersion")
api(libs.pluginSpi) {
exclude(group = "org.checkerframework", module = "checker-qual")
exclude(group = "com.google.code.gson", module = "gson")
exclude(group = "org.apache.logging.log4j", module = "log4j-api")
}

// Configurate
api(platform("org.spongepowered:configurate-bom:$configurateVersion"))
api("org.spongepowered:configurate-core") {
api(platform(libs.configurate.bom))
api(libs.configurate.core) {
exclude(group = "org.checkerframework", module = "checker-qual") // We use our own version
}
api("org.spongepowered:configurate-hocon") {
api(libs.configurate.hocon) {
exclude(group = "org.spongepowered", module = "configurate-core")
exclude(group= "org.checkerframework", module = "checker-qual")
exclude(group = "org.checkerframework", module = "checker-qual")

}
api("org.spongepowered:configurate-gson") {
api(libs.configurate.gson) {
exclude(group = "org.spongepowered", module = "configurate-core")
exclude(group = "com.google.code.gson", module = "gson") // We have the same version technically, but use the gson we provide.
exclude(group= "org.checkerframework", module = "checker-qual")
exclude(group = "org.checkerframework", module = "checker-qual")
}
api("org.spongepowered:configurate-yaml") {
api(libs.configurate.yaml) {
exclude(group = "org.spongepowered", module = "configurate-core")
exclude(group= "org.checkerframework", module = "checker-qual")
exclude(group = "org.checkerframework", module = "checker-qual")
}
api("org.spongepowered:configurate-extra-guice") {
api(libs.configurate.extraGuice) {
exclude(group = "com.google.inject", module = "guice")
}

// Compile-time static analysis
compileOnly("com.google.errorprone:error_prone_annotations:$errorproneVersion")
errorprone("com.google.errorprone:error_prone_core:$errorproneVersion")
compileOnly(libs.errorprone.annotations)
errorprone(libs.errorprone)

// Math library
api("org.spongepowered:math:$mathVersion")
api(libs.math) {
exclude(group = "com.google.errorprone", module = "error_prone_annotations")
}

testImplementation(platform("org.junit:junit-bom:$junitVersion"))
testImplementation("org.junit.jupiter:junit-jupiter-api")
testImplementation("org.junit.jupiter:junit-jupiter-params")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine")
testImplementation("org.hamcrest:hamcrest:2.2")
testImplementation("org.mockito:mockito-core:$mockitoVersion")
compileOnlyApi(libs.checkerQual)

testImplementation(platform(libs.junit.bom))
testImplementation(libs.junit.api)
testImplementation(libs.junit.params)
testRuntimeOnly(libs.junit.engine)
testRuntimeOnly(libs.junit.launcher)
testImplementation(libs.hamcrest)
testImplementation(libs.mockito)
}

tasks {
genEventImpl {
sourceCompatibility = "16"
destinationDir = project.layout.buildDirectory.dir("generated/event-factory").get().asFile
sourceCompatibility = javaTarget
destinationDirectory = project.layout.buildDirectory.dir("generated/event-factory")

outputFactory = "org.spongepowered.api.event.SpongeEventFactory"
include("org/spongepowered/api/event/*/**/*")
Expand Down Expand Up @@ -164,14 +174,14 @@ tasks {
options {
(this as? StandardJavadocDocletOptions)?.apply {
links(
"https://logging.apache.org/log4j/log4j-$log4jVersion/log4j-api/apidocs/",
"https://google.github.io/guice/api-docs/5.0.1/javadoc/",
"https://configurate.aoeu.xyz/$configurateVersion/apidocs/",
"https://www.javadoc.io/doc/com.google.code.gson/gson/$gsonVersion/",
"https://jd.spongepowered.org/math/$mathVersion"
"https://logging.apache.org/log4j/log4j-${libs.versions.log4j.get()}/log4j-api/apidocs/",
"https://google.github.io/guice/api-docs/${libs.versions.guice.get()}/javadoc/",
"https://configurate.aoeu.xyz/${libs.versions.configurate.get()}/apidocs/",
"https://www.javadoc.io/doc/com.google.code.gson/gson/${libs.versions.gson.get()}/",
"https://jd.spongepowered.org/math/${libs.versions.math.get()}"
)
sequenceOf("api", "key", "text-serializer-gson", "text-serializer-legacy", "text-serializer-plain").forEach {
links("https://jd.advntr.dev/$it/$adventureVersion/")
links("https://jd.advntr.dev/$it/${libs.versions.adventure.get()}/")
}
addBooleanOption("quiet", true)
}
Expand All @@ -196,14 +206,12 @@ tasks {

idea {
if (project != null) {
(project as ExtensionAware).extensions["settings"].run {
require(this is ExtensionAware)

this.extensions.getByType(org.jetbrains.gradle.ext.ActionDelegationConfig::class).run {
project.settings.run {
delegateActions {
delegateBuildRunToGradle = false
testRunner = org.jetbrains.gradle.ext.ActionDelegationConfig.TestRunner.PLATFORM
}
this.extensions.getByType(org.jetbrains.gradle.ext.TaskTriggersConfig::class).run {
taskTriggers {
beforeBuild(tasks.genEventImpl)
}
}
Expand Down Expand Up @@ -233,15 +241,13 @@ spongeConvention {
}

indra {
val checkstyleVersion: String by project

javaVersions {
target(17)
target(javaTarget.toInt())
}
checkstyle(checkstyleVersion)
checkstyle(libs.versions.checkstyle.get())

configurePublications {
artifactId = project.name.toLowerCase()
artifactId = project.name.lowercase()
pom {
this.url.set(projectUrl)
this.description.set(projectDescription)
Expand Down
16 changes: 2 additions & 14 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,22 +1,10 @@
group=org.spongepowered
version=10.1.0-SNAPSHOT
version=11.0.0-SNAPSHOT
organization=SpongePowered
projectUrl=https://www.spongepowered.org
projectDescription=A plugin API for Minecraft: Java Edition
javaTarget=17

javadocPublishRoot=https://jd.spongepowered.org/

org.gradle.parallel=true

adventureVersion=4.12.0
caffeineVersion=3.1.2
checkstyleVersion=10.5.0
configurateVersion=4.1.2
errorproneVersion=2.16
gsonVersion=2.10
junitVersion=5.9.1
log4jVersion=2.19.0

mathVersion=2.0.1
mockitoVersion=4.8.0
pluginSpiVersion=0.3.0
67 changes: 67 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
[metadata]
format = { version = "1.1" }

[versions]
adventure = "4.12.0"
caffeine = "3.1.8"
checker = "3.42.0"
checkstyle = "10.12.7"
configurate = "4.1.2"
errorprone = "2.24.1"
gson = "2.10.1"
guice = "5.0.1"
ideaExt = "1.1.7"
indra = "3.1.3"
junit = "5.10.1"
log4j = "2.19.0"
math = "2.0.1"
mockito = "5.9.0"
pluginSpi = "0.3.0"

[libraries]
adventure-bom = { module = "net.kyori:adventure-bom", version.ref = "adventure" }
adventure-api = { module = "net.kyori:adventure-api" }
adventure-textSerializer-gson = { module = "net.kyori:adventure-text-serializer-gson" }
adventure-textSerializer-legacy = { module = "net.kyori:adventure-text-serializer-legacy" }
adventure-textSerializer-plain = { module = "net.kyori:adventure-text-serializer-plain" }
adventure-minimessage = { module = "net.kyori:adventure-text-minimessage" }
caffeine = { module = "com.github.ben-manes.caffeine:caffeine", version.ref = "caffeine" }
configurate-bom = { module = "org.spongepowered:configurate-bom", version.ref = "configurate" }
configurate-core = { module = "org.spongepowered:configurate-core" }
configurate-hocon = { module = "org.spongepowered:configurate-hocon" }
configurate-gson = { module = "org.spongepowered:configurate-gson" }
configurate-yaml = { module = "org.spongepowered:configurate-yaml" }
configurate-extraGuice = { module = "org.spongepowered:configurate-extra-guice" }
gson = { module = "com.google.code.gson:gson", version.ref = "gson" }
guice = { module = "com.google.inject:guice", version.ref = "guice" }
log4j-api = { module = "org.apache.logging.log4j:log4j-api", version.ref = "log4j" }
math = { module = "org.spongepowered:math", version.ref = "math" }
pluginSpi = { module = "org.spongepowered:plugin-spi", version.ref = "pluginSpi" }

# build-time/annotations

checkerQual = { module = "org.checkerframework:checker-qual", version.ref = "checker" }
errorprone = { module = "com.google.errorprone:error_prone_core", version.ref = "errorprone" }
errorprone-annotations = { module = "com.google.errorprone:error_prone_annotations", version.ref = "errorprone" }
spoon = { module = "fr.inria.gforge.spoon:spoon-core", version = "10.4.2" } # bump for EIG

# testing

hamcrest = { module = "org.hamcrest:hamcrest", version = "2.2" }
junit-bom = { module = "org.junit:junit-bom", version.ref = "junit" }
junit-api = { module = "org.junit.jupiter:junit-jupiter-api" }
junit-params = { module = "org.junit.jupiter:junit-jupiter-params" }
junit-engine = { module = "org.junit.jupiter:junit-jupiter-engine" }
junit-launcher = { module = "org.junit.platform:junit-platform-launcher" }
mockito = { module = "org.mockito:mockito-core", version.ref = "mockito" }

[plugins]
errorprone = { id = "net.ltgt.errorprone", version = "3.1.0" }
eventImplGen = { id = "org.spongepowered.gradle.event-impl-gen", version = "7.1.0" }
ideaExt = { id = "org.jetbrains.gradle.plugin.idea-ext", version.ref = "ideaExt" }
indra-checkstyle = { id = "net.kyori.indra.checkstyle", version.ref = "indra" }
indra-crossdoc = { id = "net.kyori.indra.crossdoc", version.ref = "indra" }
indra-publishing = { id = "net.kyori.indra.publishing", version.ref = "indra" }
indra-publishing-sonatype = { id = "net.kyori.indra.publishing.sonatype", version.ref = "indra" }
nexusPublish = { id = "io.github.gradle-nexus.publish-plugin", version = "2.0.0-rc-1"}
spongeGradle-convention = { id = "org.spongepowered.gradle.sponge.dev", version = "2.2.0" }
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 2 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading