This repository has been archived by the owner on Jun 19, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 78
/
build.gradle.kts
69 lines (60 loc) · 2.31 KB
/
build.gradle.kts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
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/")
maven("https://jitpack.io")
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()
}
}