-
Notifications
You must be signed in to change notification settings - Fork 65
/
build.gradle
144 lines (126 loc) · 5.03 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
136
137
138
139
140
141
142
143
144
plugins {
id 'eclipse'
id 'maven-publish'
id 'net.neoforged.gradle.userdev' version '7.0.165'
id 'net.neoforged.gradle.mixin' version '7.0.165'
}
repositories {
maven {
// location of the maven that hosts JEI files
name = 'Progwml6 maven'
url = 'https://dvs1.progwml6.com/files/maven/'
}
maven {
// location of a maven mirror for JEI files, as a fallback
name = 'ModMaven'
url = 'https://modmaven.dev'
}
maven { url 'https://dl.cloudsmith.io/public/geckolib3/geckolib/maven/' }
maven {
url "https://cursemaven.com"
content {
includeGroup "curse.maven"
}
}
maven {
url = uri("https://maven.pkg.github.com/refinedmods/refinedstorage")
/* As of december 2021, GitHub packages requires authentication.
The password below is a personal access token that has read access to the Refined Mods repos.
It can be reused in other projects.
See: https://github.community/t/download-from-github-package-registry-without-authentication/14407/38 and
https://github.community/t/download-from-github-package-registry-without-authentication/14407/44
*/
credentials {
username = "anything"
password = "\u0067hp_oGjcDFCn8jeTzIj4Ke9pLoEVtpnZMP4VQgaX"
}
}
maven {
// maven that contains infiniverse
url "https://commoble.net/maven/"
}
}
version = project.getProperty('mc_ms_version')
group = 'com.mraof.minestuck'
archivesBaseName = 'Minestuck'
java.toolchain.languageVersion = JavaLanguageVersion.of(21)
compileJava.options.encoding = 'UTF-8'
compileTestJava.options.encoding = "UTF-8"
minecraft.accessTransformers.file rootProject.file('src/main/resources/META-INF/accesstransformer.cfg')
runs {
configureEach {
workingDirectory project.file('run')
systemProperty 'forge.logging.markers', 'REGISTRIES'
systemProperty 'forge.logging.console.level', 'debug'
modSource project.sourceSets.main
}
client {
// Add an uuid arg if you have specified it in a relevant gradle.properties file. NOTE: Do not use the gradle.properties file in the project! (because that one is supposed to be shared among all devs) Create one in your "gradle user home" instead.
if (project.hasProperty('mc_uuid')) {
programArguments.addAll '--uuid', project.getProperty('mc_uuid')
}
// Add an username arg if you have specified it in a relevant gradle.properties file. Note that specifying a uuid and a non-matching username (or no username specified) may cause single-player worlds to freeze up when exiting the world.
if (project.hasProperty('mc_username')) {
programArguments.addAll '--username', project.getProperty('mc_username')
}
}
server {
}
gameTestServer {
}
data {
programArguments.addAll '--mod', 'minestuck', '--all', '--output', file('src/main/generated/resources/').getAbsolutePath(), '--existing', file('src/main/resources/').getAbsolutePath()
}
}
dependencies {
implementation "net.neoforged:neoforge:${neo_version}"
annotationProcessor 'org.spongepowered:mixin:0.8.5:processor'
// http://dvs1.progwml6.com/files/maven
compileOnly "mezz.jei:jei-${mc_version}-common-api:${mc_jei_version}"
compileOnly "mezz.jei:jei-${mc_version}-neoforge-api:${mc_jei_version}"
runtimeOnly "mezz.jei:jei-${mc_version}-neoforge:${mc_jei_version}"
compileOnly "com.refinedmods:refinedstorage:${mc_refined_storage_version}"
implementation "software.bernie.geckolib:geckolib-${mc_gecko_version}"
implementation "net.commoble.infiniverse:${infiniverse_branch}:${infiniverse_version}"
}
sourceSets.main.resources {
srcDir 'src/main/generated/resources'
}
mixin {
config 'mixins.minestuck.json'
}
// Example for how to get properties into the manifest for reading by the runtime..
jar {
manifest {
attributes([
"Specification-Title": "minestuck",
"Specification-Vendor": "Minestuck Dev Team",
"Specification-Version": "1", // We are version 1 of ourselves
"Implementation-Title": project.name,
"Implementation-Version": "${version}",
"Implementation-Vendor" :"Minestuck Dev Team",
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
])
}
}
// Example configuration to allow publishing using the maven-publish task
// we define a custom artifact that is sourced from the reobfJar output task
// and then declare that to be published
// Note you'll need to add a repository here
def reobfFile = file("$buildDir/reobfJar/output.jar")
def reobfArtifact = artifacts.add('default', reobfFile) {
type 'jar'
builtBy 'reobfJar'
}
publishing {
publications {
mavenJava(MavenPublication) {
artifact reobfArtifact
}
}
repositories {
maven {
url "file:///${project.projectDir}/mcmodsrepo"
}
}
}