-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.gradle
135 lines (113 loc) · 4.08 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
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
plugins {
id 'java'
id 'com.github.johnrengelman.shadow' version '8.1.1' apply false
id "xyz.wagyourtail.unimined" version "1.3.9" apply false
id "com.hypherionmc.modutils.modpublisher" version "2.1.6"
id "com.hypherionmc.modutils.orion" version "1.0.24"
id "com.hypherionmc.modutils.orion.origami" version "1.0.24" apply false
id 'maven-publish'
}
var relType = project.properties["releaseType"] ?: "${release_type}"
ext {
isPort = (relType == 'port')
}
orion.setup {
multiProject = true
enableMirrorMaven = true
enableReleasesMaven = true
//enableSnapshotsMaven = isPort
dopplerToken = System.getenv("DOPPLER_KEY")
versioning {
identifier("${relType}")
}
}
group = project_group
subprojects {
apply plugin: "xyz.wagyourtail.unimined"
apply plugin: "java"
apply plugin: 'maven-publish'
apply plugin: 'com.github.johnrengelman.shadow'
apply plugin: 'com.hypherionmc.modutils.modpublisher'
if (project.name === "Paper") {
apply plugin: 'com.hypherionmc.modutils.orion.origami'
}
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
group = rootProject.group
repositories {
mavenCentral()
mavenLocal()
maven {
name = "Modrinth"
url = "https://api.modrinth.com/maven"
content {
includeGroup "maven.modrinth"
}
}
}
configurations {
shade
modCompileOnly
stupidRemapArch
implementation.extendsFrom shade
compileOnly.extendsFrom modCompileOnly
compileOnly.extendsFrom stupidRemapArch
}
dependencies {
// All Projects
shade "me.hypherionmc.moon-config:core:${moon_config}"
shade "me.hypherionmc.moon-config:toml:${moon_config}"
shade "me.hypherionmc.moon-config:json:${moon_config}"
shade "com.hypherionmc:rpcsdk:${rpc_sdk}"
shade "me.hypherionmc.sdlink:mcdiscordformatter-1.20.3:${discord_formatter}"
shade "net.kyori:adventure-api:${adventure}"
shade "net.kyori:adventure-text-serializer-gson:${adventure}"
shade "net.kyori:adventure-text-minimessage:${adventure}"
compileOnly 'net.luckperms:api:5.4'
compileOnly("org.projectlombok:lombok:${lombok}")
annotationProcessor("org.projectlombok:lombok:${lombok}")
}
jar {
manifest {
attributes([
'Specification-Title' : mod_name,
'Specification-Vendor' : mod_author,
'Specification-Version' : project.jar.archiveVersion,
'Implementation-Title' : project.name,
'Implementation-Version' : project.jar.archiveVersion,
'Implementation-Vendor' : mod_author,
'Implementation-Timestamp': new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"),
'Timestamp' : System.currentTimeMillis(),
'Built-On-Java' : "${System.getProperty('java.vm.version')} (${System.getProperty('java.vm.vendor')})",
'Built-On-Minecraft' : minecraft_version
])
}
}
/**
* ===============================================================================
* = DO NOT EDIT BELOW THIS LINE UNLESS YOU KNOW WHAT YOU ARE DOING =
* ===============================================================================
*/
if (project.name !== "Paper") {
unimined.minecraft(sourceSets.main, true) {
version minecraft_version
mappings {
mojmap()
devNamespace "mojmap"
}
mods {
remap(configurations.stupidRemapArch) {
catchAWNamespaceAssertion()
}
}
}
}
tasks.withType(JavaCompile).configureEach {
it.options.encoding = 'UTF-8'
it.options.release = 21
}
tasks.withType(GenerateModuleMetadata).configureEach {
enabled = false
}
}
// TODO MODULE JARS