generated from QuiltMC/quilt-template-mod
-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.gradle
151 lines (128 loc) · 3.87 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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
plugins {
id 'maven-publish'
id 'io.github.juuxel.loom-quiltflower' version '1.8.+'
id 'org.quiltmc.loom' version '1.0.+'
}
archivesBaseName = project.archives_base_name
version = "${project.version}+${project.minecraft_version}"
group = project.maven_group
sourceCompatibility = 1.17 // java 17
targetCompatibility = 1.17
loom {
accessWidenerPath = file("src/main/resources/malum.accesswidener")
runs {
datagen {
server()
name "Minecraft Data"
vmArg "-Dfabric-api.datagen"
vmArg "-Dfabric-api.datagen.output-dir=${file("src/main/generated")}"
runDir "build/datagen"
}
}
}
sourceSets.main.resources.srcDirs += ['src/main/generated']
repositories {
maven {
url = 'https://api.modrinth.com/maven'
content {
includeGroup 'maven.modrinth'
}
}
maven {
name = 'Quilt'
url = 'https://maven.quiltmc.org/repository/release'
}
maven {
name = "TerraformersMC"
url = "https://maven.terraformersmc.com/"
}
maven {
name = 'Ladysnake Mods'
url = 'https://ladysnake.jfrog.io/artifactory/mods'
}
maven {
name = "JitPack"
url = 'https://jitpack.io'
}
maven {
name = "Reach Entity Attributes"
url = "https://maven.jamieswhiteshirt.com/libs-release"
}
mavenCentral()
}
dependencies {
minecraft "com.mojang:minecraft:${project.minecraft_version}"
mappings "org.quiltmc:quilt-mappings:${project.minecraft_version}+build.${project.quilt_mappings}:intermediary-v2"
modImplementation "org.quiltmc:quilt-loader:${project.quilt_loader}"
modImplementation "org.quiltmc.quilted-fabric-api:quilted-fabric-api:${project.quilted_fabric_api_version}-${project.minecraft_version}"
modImplementation("dev.emi:trinkets:${project.trinkets}") {
exclude group: "net.fabricmc"
exclude group: "net.fabricmc.fabric-api"
exclude group: "com.terraformersmc"
}
modImplementation("dev.onyxstudios.cardinal-components-api:cardinal-components-base:${project.cca}") {
exclude group: "net.fabricmc"
exclude group: "net.fabricmc.fabric-api"
}
modImplementation("dev.onyxstudios.cardinal-components-api:cardinal-components-entity:${project.cca}") {
exclude group: "net.fabricmc"
exclude group: "net.fabricmc.fabric-api"
}
modImplementation("dev.onyxstudios.cardinal-components-api:cardinal-components-world:${project.cca}") {
exclude group: "net.fabricmc"
exclude group: "net.fabricmc.fabric-api"
}
modImplementation("com.github.Chocohead:Fabric-ASM:${project.fabric_asm}")
include("com.github.Chocohead:Fabric-ASM:${project.fabric_asm}")
include("io.github.ladysnake:satin:${project.satin}")
modRuntimeOnly("maven.modrinth:sodium:${project.sodium}")
modImplementation include("maven.modrinth:midnightlib:$midnightlib_version")
modImplementation("com.github.mrsterner:LodestoneLib-Quilt:$lodestone_version")
modImplementation("com.jamieswhiteshirt:reach-entity-attributes:${project.reach}")
implementation("com.github.LlamaLad7:MixinExtras:${project.mixin_extras}")
include("com.github.LlamaLad7:MixinExtras:${project.mixin_extras}")
}
processResources {
inputs.property 'version', version
filesMatching('quilt.mod.json') {
expand "version": version
}
}
tasks.withType(JavaCompile).configureEach {
it.options.encoding = 'UTF-8'
it.options.release = 17
}
java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
withSourcesJar()
}
jar {
from('LICENSE') {
rename { "${it}_${archivesBaseName}" }
}
}
wrapper {
gradleVersion = "7.6"
distributionType = Wrapper.DistributionType.ALL
}
// configure the maven publication
publishing {
publications {
mavenJava(MavenPublication) {
// add all the jars that should be included when publishing to maven
artifact(remapJar) {
builtBy remapJar
}
artifact(sourcesJar) {
builtBy remapSourcesJar
}
}
}
// select the repositories you want to publish to
repositories {
// uncomment to publish to the local maven
mavenLocal()
}
}
//TODO assemble.dependsOn runDatagen