-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
112 lines (89 loc) · 3.43 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
plugins {
id 'eclipse'
id 'net.minecraftforge.gradle' version "${forge_gradle_version}"
id 'org.spongepowered.mixin' version "${mixin_gradle_version}"
}
version = "${mod_stage}" != "" ? "${mc_version}-${mod_version}-${mod_stage}" : "${mc_version}-${mod_version}"
group = "meldexun.${mod_id}"
archivesBaseName = "${mod_name}"
java.toolchain.languageVersion = JavaLanguageVersion.of(8)
minecraft {
mappings channel: "${mappings_channel}", version: "${mappings_version}"
accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg')
runs {
client {
taskName "runClient ${mod_name} ${mc_version}"
environment 'MC_VERSION', "${mc_version}"
property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'
property 'forge.logging.console.level', 'info'
property 'fml.coreMods.load', "${mod_plugin_class}"
}
server {
taskName "runServer ${mod_name} ${mc_version}"
environment 'MC_VERSION', "${mc_version}"
property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'
property 'forge.logging.console.level', 'info'
}
}
}
configurations {
includedDependencies
implementation.extendsFrom(includedDependencies)
buildDependencies
}
repositories {
ivy {
url 'https://github.com/'
patternLayout {
artifact '[organisation]/[module]/releases/download/v[revision]/[module]-[revision].[ext]'
}
metadataSources { artifact() }
}
maven { url = 'https://www.cursemaven.com' }
}
dependencies {
minecraft "net.minecraftforge:forge:${mc_version}-${forge_version}"
includedDependencies 'meldexun:ASMUtil:2.3.0@jar'
includedDependencies 'meldexun:MemoryUtil:1.0.0@jar'
includedDependencies 'meldexun:MatrixUtil:1.3.0@jar'
includedDependencies 'meldexun:RandomUtil:1.0.0@jar'
includedDependencies 'meldexun:ReflectionUtil:1.0.0@jar'
buildDependencies 'curse.maven:FairyLights-233342:3068499'
buildDependencies 'curse.maven:ValkyrienSkies-258371:3286262'
buildDependencies 'curse.maven:Vampirism-233029:2890062'
implementation "org.spongepowered:mixin:${mixin_version}"
annotationProcessor "org.spongepowered:mixin:${mixin_version}:processor"
}
mixin {
add sourceSets.main, "mixins.${mod_id}.refmap.json"
config "mixins.${mod_id}.json"
}
processResources {
inputs.property('version', "${mod_stage}" != "" ? "${mod_version}-${mod_stage}" : "${mod_version}")
filesMatching('mcmod.info') {
expand version: inputs.properties.get('version')
}
}
jar {
archiveBaseName = mod_name
archiveAppendix = mc_version
archiveVersion = mod_version
archiveClassifier = mod_stage
from {
configurations.includedDependencies.collect { it.isDirectory() ? it : zipTree(it).matching { exclude 'LICENSE' } }
}
manifest {
attributes 'ModSide': 'CLIENT'
attributes 'FMLAT': 'accesstransformer.cfg'
attributes 'FMLCorePlugin': "${mod_plugin_class}"
attributes 'FMLCorePluginContainsFMLMod': 'true'
attributes 'ForceLoadAsMod': 'true'
attributes 'TweakClass': 'org.spongepowered.asm.launch.MixinTweaker'
attributes 'TweakOrder': '0'
attributes 'MixinConfigs': "mixins.${mod_id}.json"
}
}
jar.finalizedBy('reobfJar')
compileJava {
classpath = sourceSets.main.compileClasspath + configurations.buildDependencies
}