mirror of
https://github.com/BX-Team/DivineMC.git
synced 2025-12-19 14:59:25 +00:00
prepare hard fork environment
This commit is contained in:
7
.gitattributes
vendored
Normal file
7
.gitattributes
vendored
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
* text=auto eol=lf
|
||||||
|
|
||||||
|
*.sh text eol=lf
|
||||||
|
gradlew text eol=lf
|
||||||
|
*.bat text eol=crlf
|
||||||
|
|
||||||
|
*.jar binary
|
||||||
17
.gitignore
vendored
17
.gitignore
vendored
@@ -1,13 +1,16 @@
|
|||||||
# DivineMC-API and DivineMC-Server changes + paper-api-generator
|
|
||||||
DivineMC-API
|
|
||||||
DivineMC-Server
|
|
||||||
paper-api-generator/*
|
|
||||||
|
|
||||||
# IDE and Gradle things
|
# IDE and Gradle things
|
||||||
build
|
build
|
||||||
.gradle
|
.gradle
|
||||||
run
|
run
|
||||||
.idea
|
.idea
|
||||||
|
|
||||||
# Other files and folders
|
# Server things
|
||||||
build-data
|
/divinemc-server/build.gradle.kts
|
||||||
|
/divinemc-server/src/minecraft
|
||||||
|
/paper-server
|
||||||
|
/purpur-server
|
||||||
|
/divinemc-api/build.gradle.kts
|
||||||
|
/paper-api
|
||||||
|
/paper-api-generator
|
||||||
|
/purpur-api
|
||||||
|
*.jar
|
||||||
|
|||||||
@@ -8,3 +8,7 @@
|
|||||||
# To import classes from the vanilla Minecraft jar use `minecraft` as the artifactId:
|
# To import classes from the vanilla Minecraft jar use `minecraft` as the artifactId:
|
||||||
# minecraft net.minecraft.world.level.entity.LevelEntityGetterAdapter
|
# minecraft net.minecraft.world.level.entity.LevelEntityGetterAdapter
|
||||||
# minecraft net/minecraft/world/level/entity/LevelEntityGetter.java
|
# minecraft net/minecraft/world/level/entity/LevelEntityGetter.java
|
||||||
|
# To import minecraft data files, like the default chat type, use `mc_data` as the prefix:
|
||||||
|
# mc_data chat_type/chat.json
|
||||||
|
# mc_data dimension_type/overworld.json
|
||||||
|
#
|
||||||
|
|||||||
2
build-data/divinemc.at
Normal file
2
build-data/divinemc.at
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
# This file is auto generated, any changes may be overridden!
|
||||||
|
# See CONTRIBUTING.md on how to add access transformers.
|
||||||
137
build.gradle.kts
137
build.gradle.kts
@@ -1,43 +1,65 @@
|
|||||||
import io.papermc.paperweight.util.constants.PAPERCLIP_CONFIG
|
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
|
||||||
|
import org.gradle.api.tasks.testing.logging.TestLogEvent
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
java
|
java
|
||||||
`maven-publish`
|
id("io.papermc.paperweight.patcher") version "2.0.0-beta.11"
|
||||||
id("io.papermc.paperweight.patcher") version "1.7.7"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
val paperMavenPublicUrl = "https://repo.papermc.io/repository/maven-public/"
|
val paperMavenPublicUrl = "https://repo.papermc.io/repository/maven-public/"
|
||||||
|
|
||||||
repositories {
|
paperweight {
|
||||||
mavenCentral()
|
upstreams.register("purpur") {
|
||||||
maven("https://papermc.io/repo/repository/maven-public/") {
|
repo = github("PurpurMC", "Purpur")
|
||||||
content {
|
ref = providers.gradleProperty("purpurRef")
|
||||||
onlyForConfigurations(PAPERCLIP_CONFIG)
|
|
||||||
|
patchFile {
|
||||||
|
path = "purpur-server/build.gradle.kts"
|
||||||
|
outputFile = file("divinemc-server/build.gradle.kts")
|
||||||
|
patchFile = file("divinemc-server/build.gradle.kts.patch")
|
||||||
}
|
}
|
||||||
|
patchFile {
|
||||||
|
path = "purpur-api/build.gradle.kts"
|
||||||
|
outputFile = file("divinemc-api/build.gradle.kts")
|
||||||
|
patchFile = file("divinemc-api/build.gradle.kts.patch")
|
||||||
}
|
}
|
||||||
}
|
patchRepo("paperApi") {
|
||||||
|
upstreamPath = "paper-api"
|
||||||
dependencies {
|
patchesDir = file("divinemc-api/paper-patches")
|
||||||
remapper("net.fabricmc:tiny-remapper:0.10.3:fat")
|
outputDir = file("paper-api")
|
||||||
decompiler("org.vineflower:vineflower:1.10.1")
|
}
|
||||||
paperclip("io.papermc:paperclip:3.0.3")
|
patchRepo("paperApiGenerator") {
|
||||||
}
|
upstreamPath = "paper-api-generator"
|
||||||
|
patchesDir = file("divinemc-api-generator/paper-patches")
|
||||||
allprojects {
|
outputDir = file("paper-api-generator")
|
||||||
apply(plugin = "java")
|
}
|
||||||
apply(plugin = "maven-publish")
|
patchDir("purpurApi") {
|
||||||
|
upstreamPath = "purpur-api"
|
||||||
java {
|
excludes = listOf("build.gradle.kts", "build.gradle.kts.patch", "paper-patches")
|
||||||
toolchain {
|
patchesDir = file("divinemc-api/purpur-patches")
|
||||||
languageVersion = JavaLanguageVersion.of(21)
|
outputDir = file("purpur-api")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
subprojects {
|
subprojects {
|
||||||
|
apply(plugin = "java-library")
|
||||||
|
apply(plugin = "maven-publish")
|
||||||
|
|
||||||
|
extensions.configure<JavaPluginExtension> {
|
||||||
|
toolchain {
|
||||||
|
languageVersion = JavaLanguageVersion.of(21)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
"testRuntimeOnly"("org.junit.platform:junit-platform-launcher")
|
||||||
|
}
|
||||||
|
|
||||||
tasks.withType<JavaCompile> {
|
tasks.withType<JavaCompile> {
|
||||||
options.encoding = Charsets.UTF_8.name()
|
options.encoding = Charsets.UTF_8.name()
|
||||||
options.release.set(21)
|
options.release = 21
|
||||||
|
options.isFork = true
|
||||||
}
|
}
|
||||||
tasks.withType<Javadoc> {
|
tasks.withType<Javadoc> {
|
||||||
options.encoding = Charsets.UTF_8.name()
|
options.encoding = Charsets.UTF_8.name()
|
||||||
@@ -45,64 +67,29 @@ subprojects {
|
|||||||
tasks.withType<ProcessResources> {
|
tasks.withType<ProcessResources> {
|
||||||
filteringCharset = Charsets.UTF_8.name()
|
filteringCharset = Charsets.UTF_8.name()
|
||||||
}
|
}
|
||||||
|
tasks.withType<Test> {
|
||||||
|
testLogging {
|
||||||
|
showStackTraces = true
|
||||||
|
exceptionFormat = TestExceptionFormat.FULL
|
||||||
|
events(TestLogEvent.STANDARD_OUT)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
tasks.withType<AbstractArchiveTask>().configureEach {
|
||||||
|
isPreserveFileTimestamps = false
|
||||||
|
isReproducibleFileOrder = true
|
||||||
|
}
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
maven(paperMavenPublicUrl)
|
maven(paperMavenPublicUrl)
|
||||||
maven("https://oss.sonatype.org/content/groups/public/")
|
|
||||||
maven("https://ci.emc.gs/nexus/content/groups/aikar/")
|
|
||||||
maven("https://repo.aikar.co/content/groups/aikar")
|
|
||||||
maven("https://repo.md-5.net/content/repositories/releases/")
|
|
||||||
maven("https://hub.spigotmc.org/nexus/content/groups/public/")
|
|
||||||
maven("https://jitpack.io")
|
maven("https://jitpack.io")
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
paperweight {
|
extensions.configure<PublishingExtension> {
|
||||||
serverProject.set(project(":divinemc-server"))
|
repositories {
|
||||||
|
maven("https://repo.bx-team.space/snapshots") {
|
||||||
remapRepo.set("https://maven.fabricmc.net/")
|
name = "divinemc"
|
||||||
decompileRepo.set(paperMavenPublicUrl)
|
credentials(PasswordCredentials::class)
|
||||||
|
|
||||||
useStandardUpstream("purpur") {
|
|
||||||
url.set(github("PurpurMC", "Purpur"))
|
|
||||||
ref.set(providers.gradleProperty("purpurRef"))
|
|
||||||
|
|
||||||
withStandardPatcher {
|
|
||||||
apiSourceDirPath.set("Purpur-API")
|
|
||||||
serverSourceDirPath.set("Purpur-Server")
|
|
||||||
|
|
||||||
apiPatchDir.set(layout.projectDirectory.dir("patches/api"))
|
|
||||||
apiOutputDir.set(layout.projectDirectory.dir("DivineMC-API"))
|
|
||||||
|
|
||||||
serverPatchDir.set(layout.projectDirectory.dir("patches/server"))
|
|
||||||
serverOutputDir.set(layout.projectDirectory.dir("DivineMC-Server"))
|
|
||||||
}
|
|
||||||
|
|
||||||
patchTasks.register("generatedApi") {
|
|
||||||
isBareDirectory = true
|
|
||||||
upstreamDirPath = "paper-api-generator/generated"
|
|
||||||
patchDir = layout.projectDirectory.dir("patches/generated-api")
|
|
||||||
outputDir = layout.projectDirectory.dir("paper-api-generator/generated")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
tasks.generateDevelopmentBundle {
|
|
||||||
apiCoordinates = "space.bxteam.divinemc:divinemc-api"
|
|
||||||
libraryRepositories.set(
|
|
||||||
listOf(
|
|
||||||
"https://repo.maven.apache.org/maven2/",
|
|
||||||
paperMavenPublicUrl
|
|
||||||
)
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
publishing {
|
|
||||||
if (project.providers.gradleProperty("publishDevBundle").isPresent) {
|
|
||||||
publications.create<MavenPublication>("devBundle") {
|
|
||||||
artifact(tasks.generateDevelopmentBundle) {
|
|
||||||
artifactId = "dev-bundle"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
11
divinemc-server/build.gradle.kts.patch
Normal file
11
divinemc-server/build.gradle.kts.patch
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
--- a/purpur-server/build.gradle.kts
|
||||||
|
+++ b/purpur-server/build.gradle.kts
|
||||||
|
@@ -146,7 +_,7 @@
|
||||||
|
// Paper end - configure mockito agent that is needed in newer java versions
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
- implementation(project(":purpur-api"))
|
||||||
|
+ implementation(project(":divinemc-api")) // DivineMC
|
||||||
|
implementation("ca.spottedleaf:concurrentutil:0.0.2") // Paper - Add ConcurrentUtil dependency
|
||||||
|
// Paper start
|
||||||
|
implementation("org.jline:jline-terminal-ffm:3.27.1") // use ffm on java 22+
|
||||||
@@ -2,8 +2,9 @@ group = space.bxteam.divinemc
|
|||||||
|
|
||||||
mcVersion = 1.21.4
|
mcVersion = 1.21.4
|
||||||
version = 1.21.4-R0.1-SNAPSHOT
|
version = 1.21.4-R0.1-SNAPSHOT
|
||||||
purpurRef = 4bf1b988c3e2cc1277ed912e0107e2f34ab36a43
|
purpurRef = e11f9642928cdce00437b6a11cf3fb1881939d9a
|
||||||
|
|
||||||
|
org.gradle.configuration-cache=true
|
||||||
org.gradle.caching = true
|
org.gradle.caching = true
|
||||||
org.gradle.parallel = true
|
org.gradle.parallel = true
|
||||||
org.gradle.vfs.watch = false
|
org.gradle.vfs.watch = false
|
||||||
|
|||||||
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,6 +1,6 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-bin.zip
|
||||||
networkTimeout=10000
|
networkTimeout=10000
|
||||||
validateDistributionUrl=true
|
validateDistributionUrl=true
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
|
|||||||
3
gradlew
vendored
3
gradlew
vendored
@@ -86,8 +86,7 @@ done
|
|||||||
# shellcheck disable=SC2034
|
# shellcheck disable=SC2034
|
||||||
APP_BASE_NAME=${0##*/}
|
APP_BASE_NAME=${0##*/}
|
||||||
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
||||||
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
|
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
|
||||||
' "$PWD" ) || exit
|
|
||||||
|
|
||||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||||
MAX_FD=maximum
|
MAX_FD=maximum
|
||||||
|
|||||||
@@ -2,15 +2,19 @@ import java.util.Locale
|
|||||||
|
|
||||||
pluginManagement {
|
pluginManagement {
|
||||||
repositories {
|
repositories {
|
||||||
mavenLocal()
|
|
||||||
gradlePluginPortal()
|
gradlePluginPortal()
|
||||||
maven("https://papermc.io/repo/repository/maven-public/")
|
mavenLocal()
|
||||||
|
maven("https://repo.papermc.io/repository/maven-public/")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
plugins {
|
||||||
|
id("org.gradle.toolchains.foojay-resolver-convention") version "0.9.0"
|
||||||
|
}
|
||||||
|
|
||||||
rootProject.name = "DivineMC"
|
rootProject.name = "DivineMC"
|
||||||
|
|
||||||
for (name in listOf("DivineMC-API", "DivineMC-Server", "paper-api-generator")) {
|
for (name in listOf("divinemc-api", "divinemc-server", "divinemc-api-generator")) {
|
||||||
val projName = name.lowercase(Locale.ENGLISH)
|
val projName = name.lowercase(Locale.ENGLISH)
|
||||||
include(projName)
|
include(projName)
|
||||||
findProject(":$projName")!!.projectDir = file(name)
|
findProject(":$projName")!!.projectDir = file(name)
|
||||||
|
|||||||
Reference in New Issue
Block a user