-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathbuild.gradle
88 lines (74 loc) · 2.36 KB
/
build.gradle
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
plugins {
id 'babric-loom' version '1.4-SNAPSHOT'
id "maven-publish"
id("com.modrinth.minotaur") version "2.+"
id "com.diffplug.spotless" version "6.2.2"
}
sourceCompatibility = targetCompatibility = JavaVersion.VERSION_1_8
archivesBaseName = project.archives_base_name
group = project.maven_group
def ENV = System.getenv()
if (ENV.GITHUB_RUN_NUMBER) {
if (ENV.GITHUB_REF && ENV.GITHUB_REF.startsWith("refs/tags/")) {
version = project.mod_version
spotless.enforceCheck = false
} else {
version = project.mod_version + '-ci.' + ENV.GITHUB_RUN_NUMBER
}
} else {
version = project.mod_version + '+local'
}
repositories {
maven {
name = 'Babric'
url = 'https://maven.glass-launcher.net/babric'
}
maven {
name = "Jitpack"
url = "https://jitpack.io/"
content {
includeGroup("com.github.GeyserMC")
}
}
}
loom {
gluedMinecraftJar()
customMinecraftManifest.set("https://babric.github.io/manifest-polyfill/${minecraft_version}.json")
intermediaryUrl.set("https://maven.glass-launcher.net/babric/babric/intermediary/%1\$s/intermediary-%1\$s-v2.jar")
}
dependencies {
minecraft "com.mojang:minecraft:${project.minecraft_version}"
mappings "babric:barn:${project.yarn_mappings}:v2"
modImplementation "babric:fabric-loader:${project.loader_version}"
implementation "org.slf4j:slf4j-api:1.8.0-beta4"
implementation "org.apache.logging.log4j:log4j-slf4j18-impl:2.16.0"
def lombok = "org.projectlombok:lombok:1.18.22"
compileOnly lombok
annotationProcessor lombok
include(implementation("com.github.GeyserMC:MCAuthLib:d9d773e5d50327c33898c65cd545a4f6ef3ba1b5"))
}
processResources {
inputs.property "version", project.version
filesMatching("fabric.mod.json") {
expand "version": project.version
}
}
tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
}
spotless {
ratchetFrom "origin/master"
java {
licenseHeaderFile(rootProject.file("HEADER"))
}
}
modrinth {
token = System.getenv("MODRINTH_TOKEN")
projectId = "8sdj2JBj"
uploadFile = remapJar
gameVersions = [project.minecraft_version]
loaders = ["fabric"]
changelog = rootProject.file("CHANGELOG.md").text
syncBodyFrom = rootProject.file("README.md").text
}
tasks.modrinth.dependsOn(tasks.modrinthSyncBody)