forked from Blqtent/Raven-BPlusPlusPlus
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
130 lines (113 loc) · 3.93 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
// For those who want the bleeding edge
buildscript {
repositories {
jcenter()
maven {
name = "forge"
url = "http://files.minecraftforge.net/maven"
}
maven {
url 'https://repo.spongepowered.org/maven'
}
}
dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:2.1-SNAPSHOT'
classpath 'com.github.jengelman.gradle.plugins:shadow:2.0.1'
classpath 'org.spongepowered:mixingradle:0.6-SNAPSHOT'
}
}
apply plugin: 'com.github.johnrengelman.shadow'
apply plugin: 'net.minecraftforge.gradle.forge'
apply plugin: 'org.spongepowered.mixin'
apply plugin: 'java'
version = "1.2"
group = "keystrokesmod"
archivesBaseName = "[1.8.9] BetterKeystrokes V"
compileJava {
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
options.encoding 'UTF-8'
}
minecraft {
version = "1.8.9-11.15.1.2318-1.8.9"
runDir = "run"
mappings = "stable_20"
clientJvmArgs += '-Dfml.coreMods.load=keystrokesmod.client.mixin.MixinLoader'
}
mixin {
// The obfuscation environment to use when generating refMaps. This is the obfuscation which will end up in the mappings in the generated refMap.
defaultObfuscationEnv searge // Types of obf env: searge, notch.
// Sets the main sourceSets refmap name instead of add sourceSets.main so there is no conflict cause of it adding another value instead of setting the 1 value.
sourceSets {
main {
ext.refMap = 'mixins.keystrokesmod.refmap.json'
}
}
}
repositories {
// The mavenCentral() alias means that dependencies are fetched from the central Maven 2 repository (https://repo1.maven.org/maven2).
mavenCentral()
// The url to get the spongepowered dependencies from.
maven {
url 'https://repo.spongepowered.org/maven'
}
}
configurations {
// Adds a reference so that we extend/add on to it with depends so we can grab them and compile them into the jar.
embed
// Grabs what's extended/added on from/to embed and compiles it into the jar when being built.
compile.extendsFrom embed
}
dependencies {
implementation group: 'commons-io', name: 'commons-io', version: '2.11.0'
implementation 'org.projectlombok:lombok:1.18.22'
embed(fileTree(dir: "libs", include: "discord-rpc.jar"))
embed('org.spongepowered:mixin:0.6-SNAPSHOT') {
// Excludes unneeded stuff.
exclude module: 'gson'
exclude module: 'guava'
exclude module: 'jarjar'
exclude module: 'commons-codec'
exclude module: 'commons-io'
exclude module: 'launchwrapper'
exclude module: 'asm-commons'
exclude module: 'slf4j-api'
}
implementation 'org.jetbrains:annotations:22.0.0'
}
processResources {
inputs.property "version", project.version
inputs.property "mcversion", project.minecraft.version
from(sourceSets.main.resources.srcDirs) {
include 'mcmod.info'
expand 'version': project.version, 'mcversion': project.minecraft.version
}
from(sourceSets.main.resources.srcDirs) {
exclude 'mcmod.info'
}
rename "(.+_at.cfg)", "META-INF/\$1"
}
jar {
from(configurations.embed.collect {
it.isDirectory() ? it : zipTree(it)
}) {
// Excludes/Removes useless bloat files from the compiled jar.
exclude 'dummyThing',
'LICENSE.txt',
'META-INF/MUMFREY.RSA',
'META-INF/maven/**',
'org/**/*.html'
}
manifest {
attributes(
'MixinConfigs': 'mixins.keystrokesmod.json',
'FMLAT': 'ravenMCP_at.cfg',
'TweakClass': 'org.spongepowered.asm.launch.MixinTweaker',
'TweakOrder': 0,
"FMLCorePlugin": "keystrokesmod.client.mixin.MixinLoader",
"ForceLoadAsMod": true,
'FMLCorePluginContainsFMLMod': true,
"ModSide": "CLIENT"
)
}
}