forked from Fabricators-of-Create/Create
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
157 lines (136 loc) · 5.78 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
151
152
153
154
155
156
157
//file:noinspection GroovyAssignabilityCheck
plugins {
id 'fabric-loom' version '0.10-SNAPSHOT'
id 'maven-publish'
id 'io.github.juuxel.loom-quiltflower-mini' version '1.+'
id 'org.quiltmc.quilt-mappings-on-loom' version '3.1.1'
}
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
archivesBaseName = project.archives_base_name
boolean dev = System.getenv('RELEASE') == null || System.getenv('RELEASE').equals('false')
ext.buildnumber = 0
project.buildnumber = System.getenv('BUILD_NUMBER') != null ? System.getenv('BUILD_NUMBER') : 'custom'
version = "mc${project.minecraft_version}_v${project.mod_version}" + (dev && !buildnumber.equals('custom') ? "+${buildnumber}" : '')
group = project.maven_group
repositories {
mavenCentral()
mavenLocal()
maven { url = "https://api.modrinth.com/maven" }
maven { url = "https://cursemaven.com" }
maven { url = "https://maven.parchmentmc.org" }
maven { url = "https://maven.fabricmc.net/" }
maven { url = "https://maven.tterrag.com/" }
maven { url = "https://storage.googleapis.com/devan-maven/" }
maven { url = "https://maven.shedaniel.me/" }
maven { url = "https://aperlambda.github.io/maven" }
maven { url = "https://ladysnake.jfrog.io/artifactory/mods" }
maven { url = "https://maven.kotlindiscord.com/repository/terraformers/" }
maven { url = "https://maven.devos.community/releases/" }
maven { url = "https://maven.devos.community/snapshots/" }
maven { url = "https://maven.terraformersmc.com/" }
maven { url = "https://maven.cafeteria.dev" }
// maven { url 'https://maven.blamejared.com' }
maven {
url = "https://jitpack.io/"
content {
includeGroup("com.github.PepperCode1")
includeGroup("com.github.SuperCoder7979")
includeGroup("com.github.Jozufozu")
includeGroup("com.github.emilyploszaj")
}
}
maven {
url = "https://maven.jamieswhiteshirt.com/libs-release"
content {
includeGroup("com.jamieswhiteshirt")
}
}
}
dependencies {
// dev env
minecraft("com.mojang:minecraft:${project.minecraft_version}")
// THIS IS SO CURSED I LOVE IT
// names of mojmap with the docs and params of parchment, then docs and params of QM as fallback
mappings loom.layered {
it.addLayer(quiltMappings.mappings("org.quiltmc:quilt-mappings:1.18.1-rc3+build.4:v2")) // https://maven.quiltmc.org/#browse/browse:release
it.parchment("org.parchmentmc.data:parchment-1.18.1:BLEEDING-20211212.174449-1@zip") // https://ldtteam.jfrog.io/ui/native/parchmentmc-public/org/parchmentmc/data/parchment-1.18.1/BLEEDING-SNAPSHOT
it.officialMojangMappings {
setNameSyntheticMembers(false)
}
}
modImplementation("net.fabricmc:fabric-loader:${project.loader_version}")
modImplementation("me.shedaniel.cloth:cloth-config-fabric:${project.cloth_config_version}") { exclude(group: "net.fabricmc.fabric-api") }
modApi("me.shedaniel.cloth:basic-math:0.6.0")
modImplementation("com.terraformersmc:modmenu:${project.modmenu_version}")
modCompileOnly("me.shedaniel:RoughlyEnoughItems-api-fabric:${project.rei_version}") { transitive = false }
modRuntimeOnly("me.shedaniel:RoughlyEnoughItems-fabric:${project.rei_version}") { transitive = false }
modImplementation("dev.architectury:architectury-fabric:${project.architectury_version}")
modImplementation("maven.modrinth:lazydfu:0.1.2")
// dependencies
modImplementation("net.fabricmc.fabric-api:fabric-api:${project.fabric_version}")
// modImplementation("vazkii.botania:Botania:1.18.1-428-FABRIC-SNAPSHOT")
modImplementation(include("me.alphamode:ForgeTags:1.3"))
modImplementation(include("curse.maven:forge-config-api-port-fabric-547434:${project.config_api_version}"))
implementation(include('com.electronwill.night-config:core:3.6.0'))
implementation(include('com.electronwill.night-config:toml:3.6.0'))
modImplementation(include("com.tterrag.registrate:Registrate:${project.registrate_version}"))
modImplementation(include("com.jozufozu.flywheel:Flywheel-Fabric:${project.flywheel_version}"))
modImplementation(include("com.jamieswhiteshirt:reach-entity-attributes:${project.reach_entity_attributes_version}"))
modImplementation(include("dev.cafeteria:fake-player-api:${project.fake_player_api_version}"))
modImplementation(include("io.github.tropheusj:milk-lib:0.1.6"))
implementation(include("com.google.code.findbugs:jsr305:${project.jsr305_version}"))
}
loom {
accessWidenerPath = file("src/main/resources/create.accesswidener")
sourceSets {
main {
resources {
srcDir("src/generated/resources")
exclude("src/generated/resources/.cache")
}
}
}
}
loom {
runs {
datagen {
client()
name "Data Generation"
vmArg "-Dfabric-api.datagen"
vmArg "-Dfabric-api.datagen.output-dir=${file("src/generated/resources")}"
vmArg "-Dfabric-api.datagen.modid=create"
// from ae2
property "com.simibubi.create.existingData", file("src/main/resources").absolutePath
runDir "build/datagen"
}
}
}
processResources {
inputs.property "version", project.version
filesMatching("fabric.mod.json") {
expand "version": project.version
}
}
tasks.withType(JavaCompile).configureEach {
it.options.encoding = "UTF-8"
it.options.release = 17
}
java {
withSourcesJar()
}
jar {
from("LICENSE") {
rename { "${it}_${project.archivesBaseName}"}
}
}
// configure the maven publication
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
}
}
repositories {
}
}