Yatopia/build.gradle.kts
ishland c2fd399caf
Merge staging/1.16.5 (#371)
* add config for sand duping (#352)

* Lithium: cache chunk gen sea level (#349)

based off: a55cfd1c91

* PaperPR: Inline shift fields in EnumDirection (#350)

* Introducing: Yatoclip (#360)

* New async nbt cache (#347)

* update pom

* whoops

* Try to address path issue and improve Jenkins build speed

* Detailed lag and crash reports (#369)

Added "Suspected Plugins" to Watchdog and crash reports

* Drop sand duping

* Add branch specific versions

* Remove copyright

* Revert mysql-connector-java version bump

* Small fixes

* More detailed lag and crash reports

* Don't use branch information when generating metadata

* Fix Jenkins Builds version command

* Fixup patches

* Fix patch notes

* Pull Request compatibility for branch detection

* Fix Pull Request compatibility for branch detection

* Set context classloader before launch

* Inject server jar to SystemClassLoader before launch

* Try fix compile in java8

* Run tests on CodeMC and Github Actions

Co-authored-by: Simon Gardling <Titaniumtown@gmail.com>
Co-authored-by: Zoe <duplexsys@protonmail.com>
Co-authored-by: Hugo Planque <12386279+HookWoods@users.noreply.github.com>
2021-02-01 18:44:34 +08:00

69 lines
2.3 KiB
Plaintext

plugins {
`java-library`
`maven-publish`
toothpick
}
toothpick {
forkName = "Yatopia"
groupId = "org.yatopiamc"
val versionTag = System.getenv("BUILD_NUMBER")
?: "\"${gitCmd("rev-parse", "--short", "HEAD").output}\""
if(!System.getenv("BRANCH_NAME").isNullOrEmpty()) {
currentBranch = System.getenv("BRANCH_NAME")
} else if (!System.getenv("GITHUB_HEAD_REF").isNullOrEmpty()) {
currentBranch = System.getenv("GITHUB_HEAD_REF")
} else if (!System.getenv("GITHUB_REF").isNullOrEmpty()) {
currentBranch = System.getenv("GITHUB_REF").substring("refs/heads/".length)
} else {
currentBranch = gitCmd("rev-parse", "--abbrev-ref", "HEAD").output.toString().trim()
if(currentBranch == "HEAD") logger.warn("You are currently in \'detached HEAD\' state, branch information isn\'t available")
}
forkVersion = "git-$forkName-$currentBranch-$versionTag"
forkUrl = "https://github.com/YatopiaMC/Yatopia"
minecraftVersion = "1.16.5"
nmsPackage = "1_16_R3"
nmsRevision = "R0.1-SNAPSHOT"
upstream = "Paper"
upstreamBranch = "origin/master"
paperclipName = "yatopia-$minecraftVersion-paperclip.jar"
patchCreditsOutput = "PATCHES.md"
patchCreditsTemplate = ".template.md"
server {
project = project(":$forkNameLowercase-server")
patchesDir = rootProject.projectDir.resolve("patches/server")
}
api {
project = project(":$forkNameLowercase-api")
patchesDir = rootProject.projectDir.resolve("patches/api")
}
logger.lifecycle("Configured version string: $calcVersionString")
}
subprojects {
repositories {
mavenCentral()
maven("https://repo.aikar.co/content/groups/aikar/")
maven("https://nexus.velocitypowered.com/repository/velocity-artifacts-snapshots/")
maven("https://libraries.minecraft.net")
maven("https://repo.codemc.io/repository/maven-public/")
mavenLocal()
maven("${rootProjectDir}/.repository")
}
java {
if(JavaVersion.VERSION_1_8 > JavaVersion.current()){
error("This build must be run with Java 8 or better")
}
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.current()
withSourcesJar()
}
}