-
-
Notifications
You must be signed in to change notification settings - Fork 32
Expand file tree
/
Copy pathbuild.gradle
More file actions
157 lines (130 loc) · 5.41 KB
/
build.gradle
File metadata and controls
157 lines (130 loc) · 5.41 KB
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
plugins {
id 'net.fabricmc.fabric-loom' version "${loom_version}"
id 'maven-publish'
id "me.modmuss50.mod-publish-plugin" version "1.1.0"
}
version = "mc${archive_minecraft_version}-Fabric-${mod_version}"
group = project.maven_group
var realVersion = project.mod_version + '+fabric'
base {
archivesName = project.archives_base_name
}
loom {
accessWidenerPath = file("src/main/resources/${project.mod_id}.classtweaker")
// enableTransitiveAccessWideners = false // awaiting diagonal blocks update
}
fabricApi {
configureDataGeneration() {
modId = project.mod_id
client = true
outputDirectory = file("src/generated/resources")
createSourceSet = true
strictValidation = true
}
}
repositories {
maven { url "https://maven.parchmentmc.org" }
maven { url "https://maven.shedaniel.me/" }
maven { url "https://maven.terraformersmc.com/releases/" }
maven {
name = "Fuzs Mod Resources"
url = "https://raw.githubusercontent.com/Fuzss/modresources/main/maven/"
}
maven { url "https://api.modrinth.com/maven" }
maven { url "https://raw.githubusercontent.com/Fuzss/modresources/main/maven/" }
flatDir { dir 'libs' }
// 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.
}
dependencies {
minecraft "com.mojang:minecraft:${project.minecraft_version}"
implementation "net.fabricmc:fabric-loader:${project.loader_version}"
implementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_api_version}"
implementation 'com.google.errorprone:error_prone_annotations:2.37.0'
// PSA: Some older mods, compiled on Loom 0.2.1, might have outdated Maven POMs.
// You may need to force-disable transitiveness on them.
api("me.shedaniel.cloth:cloth-config-fabric:${project.cloth_config_version}") {
exclude(group: "net.fabricmc.fabric-api")
}
implementation "com.terraformersmc:modmenu:${project.modmenu_version}"
//modCompileOnly "me.shedaniel:RoughlyEnoughItems-fabric:${project.rei_version}"
//modRuntimeOnly "me.shedaniel:RoughlyEnoughItems-fabric:${project.rei_version}"
implementation annotationProcessor("maven.modrinth:kiwi:${project.kiwi_version}+fabric")
implementation "maven.modrinth:jade:${project.jade_version}+fabric"
// modRuntimeOnly "curse.maven:minihud-244260:5096818"
// modRuntimeOnly "curse.maven:malilib-303119:5096807"
implementation "maven.modrinth:serene-seasons:lIBnRbQL"
implementation "maven.modrinth:glitchcore:NGrOgEp8"
// implementation("net.jodah:typetools:0.6.3")
// modImplementation "maven.modrinth:regions-unexplored:A-0.5.6.1+1.21.1"
// modImplementation "fuzs.forgeconfigapiport:forgeconfigapiport-fabric:21.1.2"
// modImplementation "maven.modrinth:terrablender:yHeHBZPt"
implementation "maven.modrinth:diagonal-fences:UUuyVvvj"
implementation "maven.modrinth:diagonal-walls:lLuopUKw"
// https://github.com/Fuzss/modresources/tree/main/maven/fuzs/diagonalblocks/diagonalblocks-neoforge/21.1.2
implementation "fuzs.diagonalblocks:diagonalblocks-fabric:26.1.0"
implementation "fuzs.puzzleslib:puzzleslib-common:26.1.4"
implementation "fuzs.puzzleslib:puzzleslib-fabric:26.1.4"
// compileOnly "maven.modrinth:suggestion-tweaker:1.20.6-1.5.2+fabric"
// implementation fileTree(dir: "libs", include: ["*.jar"])
// annotationProcessor fileTree(dir: "libs", include: ["*.jar"])
}
processResources {
inputs.property "version", realVersion
filesMatching("fabric.mod.json") {
expand "version": realVersion
}
}
tasks.withType(JavaCompile).configureEach {
it.options.encoding = "UTF-8"
it.options.release = 25
// it.options.compilerArgs.add("-Akiwi.clientOnlyMod")
}
java {
// withSourcesJar()
sourceCompatibility = JavaVersion.VERSION_25
targetCompatibility = JavaVersion.VERSION_25
}
tasks.withType(Jar).configureEach {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
it.exclude(["/assets/${project.mod_id}/lang/en_us.existing.json",
"/.cache",
"**/*.py",
"**/*.bat",
"**/*.archive"])
}
jar {
from("LICENSE") {
rename { "${it}_${project.archives_base_name}" }
}
}
publishMods {
file = jar.archiveFile
changelog = file('CHANGELOG.md').exists() ? file('CHANGELOG.md').text : ''
type = ['release': STABLE, 'beta': BETA, 'alpha': ALPHA][release_type]
modLoaders.add("fabric")
modLoaders.add("quilt")
displayName = "[Fabric ${supported_version}] ${mod_version}"
version = realVersion
curseforge {
projectId = "560441"
accessToken = providers.environmentVariable("CURSE_TOKEN")
minecraftVersions.add(minecraft_version)
minecraftVersions.add("26.1.1")
minecraftVersions.add("26.1")
requires("kiwi-fabric")
optional("cloth-config")
}
modrinth {
projectId = "iJNje1E8"
accessToken = providers.environmentVariable("MODRINTH_TOKEN")
minecraftVersions.add(minecraft_version)
minecraftVersions.add("26.1.1")
minecraftVersions.add("26.1")
requires("kiwi")
optional("cloth-config")
}
}