mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2024-12-14 12:10:30 +00:00
76710eec9d
This adds two new modules: common-api and forge-api, which contain the common and Forge-specific interfaces for CC's Minecraft-specific API. We add a new PlatformHelper interface, which abstracts over some of the loader-specific functionality, such as reading registries[^1] or calling Forge-specific methods. This interface is then implemented in the main mod, and loaded via ServiceLoaders. Some other notes on this: - We now split shared and client-specific source code into separate modules. This is to make it harder to reference client code on the server, thus crashing the game. Eventually we'll split the main mod up too into separate source sets - this is, of course, a much bigger problem! - There's currently some nastiness here due to wanting to preserve binary compatibility of the API. We'll hopefully be able to remove this when 1.19.3 releases. - In order to build a separate Forge-specific API jar, we compile the common sources twice: once for the common jar and once for the Forge jar. Getting this to play nicely with IDEs is a little tricky and so we provide a cct.inlineProject(...) helper to handle everything. [^1]: We /can/ do this with vanilla's APIs, but it gives a lot of deprecation warnings. It just ends up being nicer to abstract over it.
103 lines
4.8 KiB
TOML
103 lines
4.8 KiB
TOML
[versions]
|
|
|
|
# Minecraft
|
|
# MC version is specified in gradle.properties, as we need that in settings.gradle.
|
|
forge = "43.1.1"
|
|
parchment = "2022.10.16"
|
|
parchmentMc = "1.19.2"
|
|
|
|
asm = "9.3"
|
|
autoService = "1.0.1"
|
|
checkerFramework = "3.12.0"
|
|
cobalt = { strictly = "[0.5.8,0.6.0)", prefer = "0.5.8" }
|
|
fastutil = "8.5.6"
|
|
guava = "31.0.1-jre"
|
|
jetbrainsAnnotations = "23.0.0"
|
|
jsr305 = "3.0.2"
|
|
kotlin = "1.7.10"
|
|
kotlin-coroutines = "1.6.0"
|
|
logback = "1.2.11"
|
|
netty = { strictly = "[4.1.77.Final,5.0)", prefer = "4.1.77.Final" }
|
|
nightConfig = "3.6.5"
|
|
slf4j = "1.7.36"
|
|
|
|
# Testing
|
|
hamcrest = "2.2"
|
|
jqwik = "1.7.0"
|
|
junit = "5.9.1"
|
|
|
|
# Build tools
|
|
cctJavadoc = "1.5.2"
|
|
checkstyle = "10.3.4"
|
|
curseForgeGradle = "1.0.11"
|
|
errorProne-core = "2.14.0"
|
|
errorProne-plugin = "2.0.2"
|
|
forgeGradle = "5.1.+"
|
|
githubRelease = "2.2.12"
|
|
ideaExt = "1.1.6"
|
|
illuaminate = "0.1.0-7-g2a5a89c"
|
|
librarian = "1.+"
|
|
minotaur = "2.+"
|
|
mixinGradle = "0.7.+"
|
|
nullAway = "0.9.9"
|
|
shadow = "7.1.2"
|
|
spotless = "6.8.0"
|
|
taskTree = "2.1.0"
|
|
vanillaGradle = "0.2.1-SNAPSHOT"
|
|
|
|
[libraries]
|
|
asm = { module = "org.ow2.asm:asm", version.ref = "asm" }
|
|
autoService = { module = "com.google.auto.service:auto-service", version.ref = "autoService" }
|
|
checkerFramework = { module = "org.checkerframework:checker-qual", version.ref = "checkerFramework" }
|
|
cobalt = { module = "org.squiddev:Cobalt", version.ref = "cobalt" }
|
|
fastutil = { module = "it.unimi.dsi:fastutil", version.ref = "fastutil" }
|
|
guava = { module = "com.google.guava:guava", version.ref = "guava" }
|
|
jetbrainsAnnotations = { module = "org.jetbrains:annotations", version.ref = "jetbrainsAnnotations" }
|
|
jsr305 = { module = "com.google.code.findbugs:jsr305", version.ref = "jsr305" }
|
|
kotlin-coroutines = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "kotlin-coroutines" }
|
|
kotlin-stdlib = { module = "org.jetbrains.kotlin:kotlin-stdlib-jdk8", version.ref = "kotlin" }
|
|
netty-http = { module = "io.netty:netty-codec-http", version.ref = "netty" }
|
|
slf4j = { module = "org.slf4j:slf4j-api", version.ref = "slf4j" }
|
|
|
|
# Testing
|
|
hamcrest = { module = "org.hamcrest:hamcrest", version.ref = "hamcrest" }
|
|
jqwik-api = { module = "net.jqwik:jqwik-api", version.ref = "jqwik" }
|
|
jqwik-engine = { module = "net.jqwik:jqwik-engine", version.ref = "jqwik" }
|
|
junit-jupiter-api = { module = "org.junit.jupiter:junit-jupiter-api", version.ref = "junit" }
|
|
junit-jupiter-engine = { module = "org.junit.jupiter:junit-jupiter-engine", version.ref = "junit" }
|
|
junit-jupiter-params = { module = "org.junit.jupiter:junit-jupiter-params", version.ref = "junit" }
|
|
|
|
# Build tools
|
|
cctJavadoc = { module = "cc.tweaked:cct-javadoc", version.ref = "cctJavadoc" }
|
|
checkstyle = { module = "com.puppycrawl.tools:checkstyle", version.ref = "checkstyle" }
|
|
errorProne-annotations = { module = "com.google.errorprone:error_prone_annotations", version.ref = "errorProne-core" }
|
|
errorProne-api = { module = "com.google.errorprone:error_prone_check_api", version.ref = "errorProne-core" }
|
|
errorProne-core = { module = "com.google.errorprone:error_prone_core", version.ref = "errorProne-core" }
|
|
errorProne-plugin = { module = "net.ltgt.gradle:gradle-errorprone-plugin", version.ref = "errorProne-plugin" }
|
|
errorProne-testHelpers = { module = "com.google.errorprone:error_prone_test_helpers", version.ref = "errorProne-core" }
|
|
forgeGradle = { module = "net.minecraftforge.gradle:ForgeGradle", version.ref = "forgeGradle" }
|
|
kotlin-plugin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" }
|
|
librarian = { module = "org.parchmentmc:librarian", version.ref = "librarian" }
|
|
nullAway = { module = "com.uber.nullaway:nullaway", version.ref = "nullAway" }
|
|
spotless = { module = "com.diffplug.spotless:spotless-plugin-gradle", version.ref = "spotless" }
|
|
vanillaGradle = { module = "org.spongepowered:vanillagradle", version.ref = "vanillaGradle" }
|
|
|
|
[plugins]
|
|
curseForgeGradle = { id = "net.darkhax.curseforgegradle", version.ref = "curseForgeGradle" }
|
|
forgeGradle = { id = "net.minecraftforge.gradle", version.ref = "forgeGradle" }
|
|
githubRelease = { id = "com.github.breadmoirai.github-release", version.ref = "githubRelease" }
|
|
ideaExt = { id = "org.jetbrains.gradle.plugin.idea-ext", version.ref = "ideaExt" }
|
|
kotlin = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
|
|
librarian = { id = "org.parchmentmc.librarian.forgegradle", version.ref = "librarian" }
|
|
minotaur = { id = "com.modrinth.minotaur", version.ref = "minotaur" }
|
|
mixinGradle = { id = "org.spongepowered.mixin", version.ref = "mixinGradle" }
|
|
shadow = { id = "com.github.johnrengelman.shadow", version.ref = "shadow" }
|
|
taskTree = { id = "com.dorongold.task-tree", version.ref = "taskTree" }
|
|
|
|
[bundles]
|
|
kotlin = ["kotlin-stdlib", "kotlin-coroutines"]
|
|
|
|
# Testing
|
|
test = ["junit-jupiter-api", "junit-jupiter-params", "hamcrest", "jqwik-api"]
|
|
testRuntime = ["junit-jupiter-engine", "jqwik-engine"]
|