generated from OffsetMonkey538/template-mod
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
106 lines (86 loc) · 2.55 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
import dex.plugins.outlet.v2.util.ReleaseType
plugins {
id 'fabric-loom' version '1.6-SNAPSHOT'
id 'io.github.dexman545.outlet' version '1.6.1'
id 'com.modrinth.minotaur' version '2.+'
}
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
archivesBaseName = "explosive-breeding"
version = "${project.mod_version}+${project.minecraft_version}"
outlet {
maintainPropertiesFile = System.getenv("DISABLE_PROPERTIES_UPDATE") == null
mcVersionRange = project.supported_minecraft_versions
allowedReleaseTypes = Set.of(ReleaseType.RELEASE)
propertiesData = [
'yarn_version': outlet.yarnVersion(project.minecraft_version),
'loader_version': outlet.loaderVersion()
]
}
loom {
splitEnvironmentSourceSets()
mods {
modid {
sourceSet sourceSets.main
sourceSet sourceSets.client
}
}
}
// https://gist.github.com/maityyy/3dbcd558d58a6412c3a2a38c72706e8e
afterEvaluate {
loom.runs.configureEach {
vmArg "-javaagent:${configurations.compileClasspath.find{ it.name.contains("sponge-mixin") }}"
}
}
repositories {
mavenCentral()
}
dependencies {
// To change the versions see the gradle.properties file
minecraft "com.mojang:minecraft:${project.minecraft_version}"
mappings "net.fabricmc:yarn:${project.yarn_version}:v2"
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
}
processResources {
inputs.properties(Map.of(
"modVersion", project.mod_version,
"supportedMinecraftVersions", project.supported_minecraft_versions
))
filesMatching("fabric.mod.json") {
expand(Map.of(
"modVersion", project.mod_version,
"supportedMinecraftVersions", project.supported_minecraft_versions
))
}
}
tasks.withType(JavaCompile).configureEach {
it.options.release = 17
}
java {
withSourcesJar()
}
jar {
from("LICENSE") {
rename { "${it}_${project.archivesBaseName}"}
}
}
modrinth {
token = System.getenv("MODRINTH_TOKEN")
projectId = "explosive-breeding"
def customVersionName = System.getenv("VERSION_NAME")
if (customVersionName != null) versionName = customVersionName
versionNumber = "${project.version}"
versionType = "beta"
uploadFile = remapJar.archiveFile
//additionalFiles = [sourcesJar.archiveFile, javadocJar.archiveFile]
additionalFiles = [sourcesJar.archiveFile]
gameVersions = outlet.mcVersions()
syncBodyFrom = rootProject.file("README.md").text
def changelogFile = rootProject.file("CHANGELOG.md")
if (changelogFile.exists()) {
changelog = changelogFile.text
}
dependencies {
}
}
tasks.modrinth.dependsOn(tasks.modrinthSyncBody)