forked from BernardoGrigiastro/RSInfinityBooster
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
202 lines (175 loc) · 5.85 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
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
buildscript {
repositories {
maven { url = 'https://files.minecraftforge.net/maven' }
maven { url = 'https://repo.spongepowered.org/maven' }
maven { url "https://plugins.gradle.org/m2/" }
mavenCentral()
}
dependencies {
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '5.1.+', changing: true
classpath group: 'org.spongepowered', name: 'mixingradle', version: '0.7-SNAPSHOT'
classpath "gradle.plugin.com.matthewprenger:CurseGradle:1.4.0"
classpath group: 'gradle.plugin.com.modrinth.minotaur', name: 'Minotaur', version: '1.1.0'
}
}
apply plugin: 'net.minecraftforge.gradle'
apply plugin: 'org.spongepowered.mixin'
apply plugin: "com.matthewprenger.cursegradle"
apply plugin: 'maven-publish'
version = "1.18.1-2.0"
def env = System.getenv()
if (env.GITHUB_RUN_NUMBER) {
version = version + "+" + "${env.GITHUB_RUN_NUMBER}"
}
group = 'uk.co.hexeption'
archivesBaseName = 'RSInfinityBooster'
java.toolchain.languageVersion = JavaLanguageVersion.of(17)
println('Java: ' + System.getProperty('java.version') + ' JVM: ' + System.getProperty('java.vm.version') + '(' + System.getProperty('java.vendor') + ') Arch: ' + System.getProperty('os.arch'))
minecraft {
mappings channel: 'official', version: '1.18.1'
runs {
client {
workingDirectory project.file('run/client')
property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'
property 'forge.logging.console.level', 'debug'
arg "-mixin.config=rsinfinitybooster.mixins.json"
mods {
rsinfinitybooster {
source sourceSets.main
}
}
}
server {
workingDirectory project.file('run/server')
property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'
property 'forge.logging.console.level', 'debug'
arg "-mixin.config=rsinfinitybooster.mixins.json"
mods {
rsinfinitybooster {
source sourceSets.main
}
}
}
data {
workingDirectory project.file('run/data')
// property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'
property 'forge.logging.console.level', 'debug'
args '--mod', 'rsinfinitybooster', '--all',
'--existing', file('src/main/resources').toString(),
'--existing', file('src/generated/resources').toString(),
'--output', file('src/generated/resources/')
mods {
rsinfinitybooster {
source sourceSets.main
}
}
}
}
}
sourceSets.main.resources { srcDir 'src/generated/resources' }
repositories {
maven {
url "https://repo.refinedmods.com/"
}
maven {
name = "Progwml6 maven"
url = "https://dvs1.progwml6.com/files/maven/"
}
maven {
url "https://www.cursemaven.com"
content {
includeGroup "curse.maven"
}
}
}
dependencies {
minecraft 'net.minecraftforge:forge:1.18.1-39.0.7'
compileOnly fg.deobf("curse.maven:rs-243076:3569563")
runtimeOnly fg.deobf("curse.maven:rs-243076:3569563")
runtimeOnly fg.deobf("mezz.jei:jei-1.18.1:9.1.1.48")
}
jar {
manifest {
attributes([
"Specification-Title" : "rsinfinitybooster",
//"Specification-Vendor": "rsinfinitybooster authors",
"Specification-Version" : "1", // We are version 1 of ourselves
"Implementation-Title" : project.name,
"Implementation-Version" : project.version,
//"Implementation-Vendor": "rsinfinitybooster authors",
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"),
"MixinConfigs" : "rsinfinitybooster.mixins.json"
])
}
}
jar.finalizedBy('reobfJar')
mixin {
add sourceSets.main, "rsinfinitybooster.refmap.json"
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
task deobfJar(type: Jar) {
from sourceSets.main.output
classifier 'deobf'
}
artifacts {
archives jar
archives sourcesJar
archives deobfJar
}
curseforge {
if (env.CURSE_API_KEY) {
apiKey = env.CURSE_API_KEY
}
project {
id = '446870'
changelog = 'A changelog can be found at https://github.com/Hexeption/RSInfinityBooster'
releaseType = 'release'
addGameVersion '1.18'
mainArtifact(jar) {
displayName = "RSInfinityBooster v$version"
}
relations {
requiredDependency 'refined-storage'
}
}
}
// configure the maven publication
publishing {
publications {
mavenJava(MavenPublication) {
artifact jar
artifact sourcesJar
artifact deobfJar
}
}
// select the repositories you want to publish to
repositories {
// uncomment to publish to the local maven
// mavenLocal()
if (env.REPO_PASSWORD) {
maven {
url = "https://repo.hexeption.dev/repository/hex-mods/"
credentials {
username = "admin"
password = env.REPO_PASSWORD
}
}
}
}
}
import com.modrinth.minotaur.TaskModrinthUpload
task publishModrinth (type: TaskModrinthUpload){
if (env.MODRINTH_API_KEY) {
token = env.MODRINTH_API_KEY
}
projectId = 'Sjzdj2cy'
versionName = "RSInfinityBooster v$version"
changelog = 'A changelog can be found at https://github.com/Hexeption/RSInfinityBooster'
versionNumber = "$version"
uploadFile = jar
addGameVersion("1.18.1")
addLoader('forge')
}