-
Notifications
You must be signed in to change notification settings - Fork 0
/
mcreator.gradle
76 lines (71 loc) · 2.4 KB
/
mcreator.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
repositories {
maven {
url = uri("https://maven.pkg.github.com/endorh/simple-config")
name = "SimpleConfig"
credentials {
username = "gradle" // Not important, must not be empty
// read:packages only GitHub token published by Endor H
// You may as well use your own, until GitHub supports unauthenticated maven read access
// https://github.com/orgs/community/discussions/26634#discussioncomment-3252637
password = "\u0067hp_SjEzHOWgAWIKVczipKZzLPPJcCMHHd1LILfK"
}
content {
// Improve dependency resolution speed, by explicitly declaring the only hosted group
includeGroup("endorh.simpleconfig")
}
}
}
dependencies {
compileOnly "endorh.simpleconfig:simpleconfig-1.18.2:1.0.5:api"
runtimeOnly fg.deobf("endorh.simpleconfig:simpleconfig-1.18.2:1.0.5")
}
def extraModsDir = 'extra-mods-1.18.2'
task addnewfoldersmods(type: DefaultTask){
ant.mkdir(dir: 'extra-mods-1.18.2/');
}
repositories {
flatDir {
name "extra-mods"
dir file(extraModsDir)
}
}
dependencies
{
for (extraModJar in fileTree(dir: extraModsDir, include: '*.jar')) {
def basename = extraModJar.name.substring(0, extraModJar.name.length() - ".jar".length())
def versionSep = basename.lastIndexOf('-')
assert versionSep != -1
def artifactId = basename.substring(0, versionSep)
def version = basename.substring(versionSep + 1)
runtimeOnly fg.deobf("extra-mods:$artifactId:$version")}
}
minecraft {
mappings channel: 'official', version: '1.18.2'
accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg')
runs {
client {
workingDirectory project.file('run')
property 'forge.logging.markers', 'REGISTRIES'
property 'forge.logging.console.level', 'debug'
property 'mixin.env.remapRefMap', 'true'
property 'mixin.env.refMapRemappingFile', "${buildDir}/createSrgToMcp/output.srg"
mods {
examplemod {
source sourceSets.main
}
}
}
server {
workingDirectory project.file('run')
property 'forge.logging.markers', 'REGISTRIES'
property 'forge.logging.console.level', 'debug'
property 'mixin.env.remapRefMap', 'true'
property 'mixin.env.refMapRemappingFile', "${buildDir}/createSrgToMcp/output.srg"
mods {
examplemod {
source sourceSets.main
}
}
}
}
}