-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbuild.gradle
142 lines (114 loc) · 3.58 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
buildscript {
repositories {
maven { url = 'https://files.minecraftforge.net/maven' }
maven { url = 'https://repo.spongepowered.org/repository/maven-public/' }
}
dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:4.+'
classpath 'org.spongepowered:mixingradle:0.7-SNAPSHOT'
}
}
apply plugin: 'net.minecraftforge.gradle'
apply plugin: 'org.spongepowered.mixin'
group = 'me.ritomg'
version = '0.2B'
archivesBaseName = 'Ananta'
compileJava {
sourceCompatibility = targetCompatibility = '1.8'
options.encoding = 'UTF-8'
}
repositories {
maven { url = 'https://repo.spongepowered.org/repository/maven-public/' }
maven { url = 'https://impactdevelopment.github.io/maven/' }
maven { url = "https://jitpack.io" }
maven { url = 'https://lukflug.github.io/maven' }
}
minecraft {
mappings channel: 'stable', version: '39-1.12'
runs {
client {
workingDirectory project.file('run')
property 'fml.coreMods.load', 'me.ritomg.ananta.mixin.CoreMixin'
property 'forge.logging.markers', 'REGISTRIES'
property 'forge.logging.console.level', 'debug'
mods {
ananta {
source sourceSets.main
}
}
}
server {
workingDirectory project.file('run')
property 'forge.logging.markers', 'REGISTRIES'
property 'forge.logging.console.level', 'debug'
mods {
ananta {
source sourceSets.main
}
}
}
}
}
configurations {
jarLibs
// Force choosing the correct nightly build because Mac OS chooses an invalid one
all {
resolutionStrategy {
force 'org.lwjgl.lwjgl:lwjgl-platform:2.9.4-nightly-20150209'
}
}
}
dependencies {
minecraft 'net.minecraftforge:forge:1.12.2-14.23.5.2854'
jarLibs('org.spongepowered:mixin:0.7.11-SNAPSHOT') {
exclude module: 'commons-io'
exclude module: 'gson'
exclude module: 'guava'
exclude module: 'launchwrapper'
exclude module: 'log4j-core' // we want to exclude this as well because 0.7.11 includes it too new for MC
}
// Hacky way to get mixin work
annotationProcessor('org.spongepowered:mixin:0.8.2:processor') {
exclude module: 'gson'
}
jarLibs('club.minnced:java-discord-rpc:2.0.2') {
exclude module: 'jna'
}
jarLibs('com.lukflug:panelstudio:0.2.0-SNAPSHOT')
jarLibs('com.lukflug:panelstudio-mc12:0.2.0-SNAPSHOT')
// Add everything in jarLibs to implementation (compile)
implementation configurations.jarLibs
}
processResources {
inputs.property "version", project.version
from(sourceSets.main.resources.srcDirs) {
include 'mcmod.info'
include 'refmap.ananta.json'
expand 'version':'0.2'
}
from(sourceSets.main.resources.srcDirs) {
exclude 'mcmod.info'
}
}
mixin {
defaultObfuscationEnv 'searge'
add sourceSets.main, 'refmap.ananta.json'
}
jar {
manifest {
attributes(
'MixinConfigs': 'mixins.ananta.json',
'tweakClass': 'org.spongepowered.asm.launch.MixinTweaker',
'TweakOrder': 0,
'FMLCorePluginContainsFMLMod': 'true',
'FMLCorePlugin': 'me.ritomg.ananta.mixin.CoreMixin',
'ForceLoadAsMod': 'true',
)
}
// Copy needed libs to jar
from {
configurations.jarLibs.collect {
it.isDirectory() ? it : zipTree(it)
}
}
}