forked from PrismLauncherCommunity/Blahaj
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
78 lines (63 loc) · 1.98 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
plugins {
id 'fabric-loom' version '1.2-SNAPSHOT'
id "io.github.juuxel.loom-vineflower" version "1.+" // Vineflower, a better decompiler
id "me.modmuss50.mod-publish-plugin" version "0.3.4" // https://github.com/modmuss50/mod-publish-plugin
}
archivesBaseName = archives_base_name
version = mod_version
group = maven_group
repositories {
maven { url = 'https://maven.parchmentmc.org' } // Parchment Mappings
maven { url = "https://maven.quiltmc.org/repository/release" } // Quilt Mappings
}
dependencies {
minecraft "com.mojang:minecraft:${minecraft_version}" // Minecraft
mappings(loom.layered { // Mappings
it.mappings("org.quiltmc:quilt-mappings:${minecraft_version}+build.${qm_version}:intermediary-v2")
it.parchment("org.parchmentmc.data:parchment-${minecraft_version}:${parchment_version}@zip")
it.officialMojangMappings { nameSyntheticMembers = false }
})
modImplementation "net.fabricmc:fabric-loader:${loader_version}" // Fabric Loader
modImplementation "net.fabricmc.fabric-api:fabric-api:${fabric_version}" // Fabric API
}
processResources {
Map<String, Object> properties = [
"version": version,
"minecraft_version": minecraft_version
]
properties.forEach((k, v) -> inputs.property(k, v))
filesMatching("fabric.mod.json") {
expand properties
}
duplicatesStrategy = DuplicatesStrategy.WARN
}
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}" }
}
}
publishMods {
file = remapJar.archiveFile
version = "$mod_version-mc$minecraft_version"
changelog = "Blahaj!"
type = STABLE
displayName = "Blåhaj Mod v$mod_version for $minecraft_version"
modLoaders.add("fabric")
modrinth {
projectId = modrinth_id
accessToken = System.getenv("MODRINTH_TOKEN")
minecraftVersions.add(minecraft_version)
requires {
slug = "fabric-api"
}
}
}