-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
131 lines (104 loc) · 3.93 KB
/
Copy pathbuild.gradle
File metadata and controls
131 lines (104 loc) · 3.93 KB
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
plugins {
id 'eclipse'
id 'maven-publish'
id 'net.minecraftforge.gradle' version '6.0.24'
id 'org.parchmentmc.librarian.forgegradle' version '1.+'
id 'org.spongepowered.mixin' version '0.7.+'
}
group = 'net.randomcara.raidborn'
version = '0.1-1.20.1'
java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
}
minecraft {
mappings channel: 'parchment', version: '2023.06.26-1.20.1'
runs {
client {
workingDirectory project.file('run')
property 'mixin.env.remapRefMap', 'true'
property 'mixin.env.refMapRemappingFile', tasks.named('createSrgToMcp').get().outputs.files.singleFile
mods {
raidborn {
source sourceSets.main
}
}
}
server {
workingDirectory project.file('run')
property 'mixin.env.remapRefMap', 'true'
property 'mixin.env.refMapRemappingFile', tasks.named('createSrgToMcp').get().outputs.files.singleFile
mods {
raidborn {
source sourceSets.main
}
}
}
}
}
repositories {
// bentoslib comes from here, run publishToMavenLocal in that project first
mavenLocal()
// forge first, it serves net.minecraftforge and cpw.mods (eventbus asks for modlauncher 10.0.+)
maven { url = 'https://maven.minecraftforge.net' }
// content filters below. without them gradle asks every repo for every artifact, and one repo
// being down aborts resolution instead of falling through to the next. sponge threw 522s once
// and killed the build over an artifact that wasn't even hosted there.
maven {
name = 'SpongePowered'
url = 'https://repo.spongepowered.org/repository/maven-public/'
content { includeGroupByRegex 'org\\.spongepowered.*' }
}
maven {
url = 'https://maven.parchmentmc.org'
content { includeGroupByRegex 'org\\.parchmentmc.*' }
}
maven {
url = 'https://maven.theillusivec4.top/'
content { includeGroupByRegex 'top\\.theillusivec4.*' }
}
maven {
url = 'https://maven.blamejared.com'
content {
includeGroupByRegex 'mezz\\.jei.*'
includeGroupByRegex 'vazkii.*'
}
}
mavenCentral()
}
dependencies {
minecraft 'net.minecraftforge:forge:1.20.1-47.4.9'
annotationProcessor 'org.spongepowered:mixin:0.8.5:processor'
implementation fg.deobf('net.randomcara.bentoslib:bentoslib:0.1-1.20.1')
runtimeOnly fg.deobf('top.theillusivec4.curios:curios-forge:5.14.1+1.20.1')
compileOnly fg.deobf('top.theillusivec4.curios:curios-forge:5.14.1+1.20.1:api')
runtimeOnly fg.deobf('vazkii.patchouli:Patchouli:1.20.1-84.1-FORGE')
compileOnly fg.deobf('vazkii.patchouli:Patchouli:1.20.1-84.1-FORGE:api')
compileOnly fg.deobf('mezz.jei:jei-1.20.1-common-api:15.20.0.106')
compileOnly fg.deobf('mezz.jei:jei-1.20.1-forge-api:15.20.0.106')
runtimeOnly fg.deobf('mezz.jei:jei-1.20.1-forge:15.20.0.106')
}
mixin {
add sourceSets.main, 'raidborn.refmap.json'
config 'raidborn.mixins.json'
}
jar {
// mixin's AP writes raidborn.refmap.json into the classes dir and MixinGradle registers the
// same file through the sourceSet, so it shows up twice. identical copies, but gradle 7+
// treats that as an error instead of a warning.
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
// license text goes in the jar, mods.toml only carries the name of it
from(rootProject.file('LICENSE.txt'))
manifest {
attributes([
'MixinConfigs' : 'raidborn.mixins.json',
'Implementation-Title' : 'Raidborn: Join the Illagers',
'Implementation-Version': project.version,
'Implementation-Vendor' : 'Randomcara7'
])
}
}
tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8'
}