generated from JamCoreModding/multi-loader-template-mod
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
93 lines (77 loc) · 2.44 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
plugins {
id "architectury-plugin" version "3.4-SNAPSHOT"
id "dev.architectury.loom" version "1.7-SNAPSHOT" apply false
id "me.shedaniel.unified-publishing" version "0.1.+" apply false
id "com.github.breadmoirai.github-release" version "2.4.1"
}
if (System.getenv("GITHUB_TOKEN") != null) {
githubRelease {
token(System.getenv("GITHUB_TOKEN"))
owner("JamCoreModding")
repo("wake-up-time")
tagName("${project.version}")
releaseName("V${project.version}")
body(project.rootProject.file("CHANGELOG.md").text)
draft(false)
if (project.branch != null) {
targetCommitish(project.branch)
}
}
}
subprojects {
apply plugin: "dev.architectury.loom"
loom {
silentMojangMappingsLicense()
}
jar {
manifest {
attributes([
'Specification-Title' : mod_name,
'Specification-Version' : project.jar.archiveVersion,
'Implementation-Title' : project.name,
'Implementation-Version' : project.jar.archiveVersion,
'Built-On-Java' : "${System.getProperty('java.vm.version')} (${System.getProperty('java.vm.vendor')})",
'Built-On-Minecraft' : minecraft_version,
'JamLib-File-Name' : "wake_up_time-${project.base.archivesName.get()}-${rootProject.version}.jar",
])
}
}
dependencies {
minecraft "com.mojang:minecraft:${rootProject.minecraft_version}"
mappings loom.officialMojangMappings()
}
}
allprojects {
apply plugin: "java"
apply plugin: "architectury-plugin"
apply plugin: "maven-publish"
version = rootProject.version
group = rootProject.group
repositories {
mavenCentral()
maven {
name = "Modrinth"
url = "https://api.modrinth.com/maven"
}
maven {
name = "Jamalam's Maven"
url = "https://maven.jamalam.tech/releases"
}
}
base {
archivesName = "wake_up_time"
}
tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
options.release = 21
}
tasks.create("prepareWorkspace") {}
java {
withSourcesJar()
}
tasks.publish {
dependsOn(":githubRelease")
dependsOn("fabric:publishUnified")
dependsOn("neoforge:publishUnified")
}
}