forked from Anvil-Dev/AnvilCraft
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
123 lines (106 loc) · 4.22 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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
import net.fabricmc.loom.task.RemapJarTask
plugins {
alias libs.plugins.architectury
alias libs.plugins.architectury.loom apply false
}
def is_root_project = project == rootProject
architectury {
minecraft = libs.versions.minecraft
}
subprojects {
apply plugin: "dev.architectury.loom"
loom {
silentMojangMappingsLicense()
}
repositories {
mavenLocal()
mavenCentral()
maven { url = "https://server.cjsah.net:1002/maven/" }
maven { url = "https://api.modrinth.com/maven" } // LazyDFU, Jade
maven { url = "https://maven.terraformersmc.com/releases/" } // Mod Menu, EMI
maven { url = "https://maven.shedaniel.me/" } // Cloth Config, REI
maven {
url "https://cursemaven.com"
content {
includeGroup "curse.maven"
}
} // Curse Forge File
maven {
name = "Jared's maven"
url = "https://maven.blamejared.com/"
} // JEI
maven {
// location of a maven mirror for JEI files, as a fallback
url = "https://dvs1.progwml6.com/files/maven/"
} // JEI mirror, AE2
maven { url = "https://maven.parchmentmc.org" } // Parchment mappings
maven { url = "https://maven.quiltmc.org/repository/release" } // Quilt Mappings
maven { url = "https://maven.firstdarkdev.xyz/snapshots" } // LDLib
maven { // Flywheel
url = "https://maven.tterrag.com/"
content {
// need to be specific here due to version overlaps
includeGroup("com.jozufozu.flywheel")
includeGroup("com.tterrag.registrate")
includeGroup("com.simibubi.create")
}
}
maven { // Patchouli
url "https://maven.blamejared.com"
}
maven { url = "https://mvn.devos.one/snapshots/" }
}
dependencies {
minecraft "com.mojang:minecraft:${libs.versions.minecraft.get()}"
// The following line declares the mojmap mappings, you may use other mappings as well
if (is_root_project) {
// layered mappings - Mojmap names, parchment and QM docs and parameters
mappings loom.layered {
it.mappings("org.quiltmc:quilt-mappings:${libs.versions.minecraft.get()}+build.${libs.versions.quiltMappings.get()}:intermediary-v2")
it.parchment("org.parchmentmc.data:parchment-1.20.1:${libs.versions.parchment.get()}@zip")
it.officialMojangMappings { nameSyntheticMembers = false }
}
}
// lombok
compileOnly 'org.projectlombok:lombok:1.18.24'
annotationProcessor 'org.projectlombok:lombok:1.18.24'
implementation 'com.google.code.findbugs:jsr305:3.0.2'
}
tasks.register('remapSlimJar', RemapJarTask) {
dependsOn(jar)
inputFile.set(jar.archiveFile)
addNestedDependencies = false
archiveClassifier.set("slim")
}
tasks.remapJar.dependsOn('remapSlimJar')
}
allprojects {
apply plugin: "java"
apply plugin: "architectury-plugin"
apply plugin: "maven-publish"
archivesBaseName = "${project.name}-${libs.versions.minecraft.get()}"
group = rootProject.maven_group
// Formats the mod version to include the loader, Minecraft version, and build number (if present)
String buildNumber
String buildType = 'build'
if (System.getenv("CI_BUILD") == 'false') buildNumber = null
else {
if (System.getenv("PR_BUILD") != 'false') buildType = 'pr'
buildNumber = System.getenv("GITHUB_RUN_NUMBER")
}
version = "${mod_version}" + (buildNumber != null ? "+${buildType}.${buildNumber}" : "")
repositories {
// Add repositories to retrieve artifacts from in here.
// You should only use this when depending on other mods because
// Loom adds the essential maven repositories to download Minecraft and libraries from automatically.
// See https://docs.gradle.org/current/userguide/declaring_repositories.html
// for more information about repositories.
}
tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
options.release.set(17)
}
java {
withSourcesJar()
}
}