generated from BocchiKessokuTeam/ForgeTemplateMod-ArchLoom
-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle
89 lines (76 loc) · 2.33 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
plugins {
alias(libs.plugins.architectury.loom)
alias(libs.plugins.modpublisher)
id "maven-publish"
}
base.archivesName = libs.versions.archives.name.get()
version = "${libs.versions.version.get()}-mc${libs.versions.minecraft.version.get()}"
group = libs.versions.maven.group.get()
repositories {
maven { url "https://maven.neoforged.net/releases/" }
maven {
url "https://maven2.bai.lol"
content {
includeGroup "lol.bai"
}
}
}
dependencies {
minecraft libs.minecraft
mappings loom.layered {
mappings variantOf(libs.yarn.mappings) { classifier("v2") }
mappings libs.yarn.mappings.patch
}
neoForge libs.neoforge
modImplementation libs.badpackets
implementation libs.jsr305
}
processResources {
inputs.property "version", project.version
filesMatching("META-INF/neoforge.mods.toml") {
expand "version": project.version
}
}
tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
options.release = 21
}
java {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
withSourcesJar()
}
// configure the maven publication
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
}
}
// See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing.
repositories {
// Add repositories to publish to here.
// Notice: This block does NOT have the same function as the block in the top level.
// The repositories here will be used for publishing your artifact, not for
// retrieving dependencies.
}
}
publisher {
apiKeys {
modrinth System.getenv("MODRINTH_TOKEN")
curseforge System.getenv("CURSEFORGE_TOKEN")
}
setCurseID("${libs.versions.id.curseforge.get()}")
setModrinthID("${libs.versions.id.modrinth.get()}")
setVersionType("alpha")
setChangelog(file("CHANGELOG.md").getText("UTF-8"))
setVersion("${project.version}")
setDisplayName("${project.version}")
setGameVersions("1.21", "1.21.1")
setLoaders(loom.platform.get().id())
setCurseEnvironment("client")
setArtifact(remapJar)
addAdditionalFile(sourcesJar)
modrinthDepends.required("badpackets")
curseDepends.required("badpackets")
}