-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
145 lines (133 loc) · 3.99 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
143
144
145
buildscript {
def mcVersion
def (major, minor, patch) = project.name.tokenize('-')[0].tokenize('.')
mcVersion = "${major}${minor.padLeft(2, '0')}${(patch ?: '').padLeft(2, '0')}" as int
def fabric = mcVersion >= 11400 && !project.name.endsWith("-forge")
project.ext.mcVersion = mcVersion
project.ext.fabric = fabric
repositories {
mavenLocal()
mavenCentral()
maven {
name = "fabric"
url = "https://maven.fabricmc.net/"
}
if (!fabric) {
maven {
name = "forge"
url = "https://maven.minecraftforge.net"
}
}
maven {
name = "sonatype"
url = "https://oss.sonatype.org/content/repositories/snapshots/"
}
maven { url 'https://jitpack.io' }
}
dependencies {
if (fabric) {
classpath 'fabric-loom:fabric-loom.gradle.plugin:0.5-SNAPSHOT'
} else if (mcVersion >= 11400) {
classpath('net.minecraftforge.gradle:ForgeGradle:3.+'){
exclude group: 'trove', module: 'trove' // preprocessor/idea requires more recent one
}
} else if (mcVersion >= 10800) {
classpath('com.github.ReplayMod:ForgeGradle:' + (
mcVersion >= 11200 ? '541e1485' : // FG 2.3
mcVersion >= 10904 ? '5c1f53dc' : // FG 2.2
'48c4f0c6' // FG 2.1
) + ':all')
} else {
classpath 'com.github.ReplayMod:ForgeGradle:a8a9e0ca:all' // FG 1.2
}
}
}
def FG3 = !fabric && mcVersion >= 11400
def FABRIC = fabric
if (FABRIC) {
apply plugin: 'fabric-loom'
} else if (FG3) {
apply plugin: 'net.minecraftforge.gradle'
} else if (mcVersion >= 10800) {
apply plugin: 'net.minecraftforge.gradle.forge'
} else {
apply plugin: 'forge'
}
apply plugin: 'com.replaymod.preprocess'
preprocess {
vars.put("MC", project.mcVersion)
vars.put("FABRIC", project.fabric ? 1 : 0)
}
group 'de.johni0702.minecraft.jgui'
version 'git'
sourceCompatibility = 1.8
targetCompatibility = 1.8
if (mcVersion >= 11400) {
sourceSets {
api
}
}
repositories {
mavenLocal()
mavenCentral()
maven {
name = "fabric"
url = "https://maven.fabricmc.net/"
}
maven { url 'https://jitpack.io' }
}
dependencies {
compile('com.github.ReplayMod:lwjgl-utils:27dcd66')
}
if (FABRIC) {
minecraft {
refmapName = 'mixins.jgui.refmap.json'
}
} else {
minecraft {
if (!FG3) {
version = [
11200: '1.12.2-14.23.0.2486',
10904: '1.9.4-12.17.0.1976',
10809: '1.8.9-11.15.1.1722',
10800: '1.8-11.14.4.1563',
10710: '1.7.10-10.13.4.1558-1.7.10',
][mcVersion]
}
mappings = [
11404: "snapshot_20190719-1.14.3",
11200: 'snapshot_20170615',
10904: 'snapshot_20160518',
10809: 'stable_22',
10800: 'snapshot_nodoc_20141130',
10710: 'stable_12',
][mcVersion]
}
}
dependencies {
if (FABRIC) {
minecraft 'com.mojang:minecraft:' + [
11404: '1.14.4',
11502: '1.15.2',
11601: '1.16.1',
11604: '1.16.4',
][mcVersion]
mappings 'net.fabricmc:yarn:' + [
11404: '1.14.4+build.16',
11502: '1.15.2+build.14',
11601: '1.16.1+build.17:v2',
11604: '1.16.4+build.6:v2',
][mcVersion]
modCompile 'net.fabricmc:fabric-loader:' + [
11404: '0.4.8+build.155',
11502: '0.7.8+build.189',
11601: '0.8.8+build.202',
11604: '0.10.6+build.214',
][mcVersion]
}
if (FG3) {
minecraft 'net.minecraftforge:forge:' + [
11404: '1.14.4-28.1.113',
][mcVersion]
}
}