-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathbuild.gradle
97 lines (84 loc) · 3.23 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
plugins {
id("org.quiltmc.loom") version "1.1.+"
id("org.ajoberstar.grgit") version "4.1.0"
}
java.sourceCompatibility = JavaVersion.VERSION_17
java.targetCompatibility = JavaVersion.VERSION_17
archivesBaseName = archives_base_name
version = "$mod_version-rev.${grgit.head().abbreviatedId}"
group = maven_group
repositories {
maven { url = "https://maven.terraformersmc.com/releases" } // Mod Menu
maven { url = "https://api.modrinth.com/maven" }
maven { url = "https://mvn.devos.one/snapshots/" } // SCRT
maven { url = "https://maven.ladysnake.org/releases" } // CCA
maven { url = "https://maven.gegy.dev" } // LDL
maven { url = "https://maven.parchmentmc.org" }
maven { url = "https://jitpack.io/" } // Mixin Extras
}
dependencies {
// Setup
minecraft("com.mojang:minecraft:$minecraft_version")
mappings(loom.layered {
mappings("org.quiltmc:quilt-mappings:$minecraft_version+build.$qm_version:intermediary-v2")
parchment("org.parchmentmc.data:parchment-$parchment_version@zip")
officialMojangMappings { nameSyntheticMembers = false }
})
modImplementation("org.quiltmc:quilt-loader:$loader_version")
// Dependencies
modImplementation("org.quiltmc.quilted-fabric-api:quilted-fabric-api:$qfapi_version-$minecraft_version")
modImplementation(include("io.github.tropheusj.stonecutter_recipe_tags:fabric:5.2.0+1.19.4.fabric")) { transitive = false }
modImplementation(include("maven.modrinth:gravity-api:$gravity_api_version"))
modImplementation(include("dev.onyxstudios.cardinal-components-api:cardinal-components-base:$cca_version"))
modImplementation(include("dev.onyxstudios.cardinal-components-api:cardinal-components-entity:$cca_version"))
modImplementation(include("maven.modrinth:midnightlib:$midnight_lib_version-quilt"))
modImplementation(include("maven.modrinth:json-entity-animation:$jea_version"))
modImplementation(include("maven.modrinth:no-indium:$no_indium_version"))
implementation(include("net.objecthunter:exp4j:0.4.8")) // Velocity Helper math
annotationProcessor(modImplementation(include("com.github.LlamaLad7.MixinExtras:mixinextras-fabric:$mixin_extras_version")))
// Compat
modImplementation("com.terraformersmc:modmenu:$mod_menu_version")
modCompileOnly("maven.modrinth:visiblebarriers:$vb_version")
modCompileOnly("dev.lambdaurora:lambdynamiclights:$ldl_version")
modCompileOnly("com.github.Virtuoel:Pehkui:$pehkui_version")
modCompileOnly("maven.modrinth:rayon:$rayon_version-fabric")
modCompileOnly("maven.modrinth:sodium:$sodium_version")
}
loom {
accessWidenerPath.set(file("src/main/resources/portalcubed.accesswidener"))
runs {
create("datagen") {
client()
name("Data Generation")
vmArg("-Dfabric-api.datagen")
vmArg("-Dfabric-api.datagen.output-dir=${file("src/generated/resources")}")
vmArg("-Dfabric-api.datagen.modid=portalcubed")
}
}
}
sourceSets {
main {
resources {
srcDir("src/generated/resources")
exclude("src/generated/resources/.cache")
}
}
}
tasks.processResources {
inputs.property("version", project.version)
filesMatching("quilt.mod.json") {
expand("version": project.version)
}
}
tasks.compileJava {
options.encoding = "UTF-8"
options.release.set(17)
}
java {
withSourcesJar()
}
tasks.jar {
from("LICENSE") {
rename { "${it}_${base.archivesName.get()}" }
}
}