-
Notifications
You must be signed in to change notification settings - Fork 8
/
build.gradle
166 lines (146 loc) · 4.57 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
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
buildscript {
repositories {
jcenter()
//maven { url = "http://files.minecraftforge.net/maven" }
maven { url = 'https://maven.minecraftforge.net/' }
maven { url = 'https://repo.spongepowered.org/repository/maven-public/' }
}
dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT'
classpath 'org.spongepowered:mixingradle:0.6-SNAPSHOT'
}
}
apply plugin: 'net.minecraftforge.gradle.forge'
apply plugin: 'org.spongepowered.mixin'
// Load properties file, easier to manage versions of required dependencies
file "build.properties" withReader {
def prop = new Properties()
prop.load(it)
ext.config = new ConfigSlurper().parse prop
}
if (System.getenv('VERSION') != null) {
version = System.getenv('VERSION')
} else {
version = "12.2.82"
}
group = "tnfcmod"
archivesBaseName = "TNFCMod"
sourceCompatibility = targetCompatibility = '1.8'
compileJava {
sourceCompatibility = targetCompatibility = '1.8'
}
minecraft {
version = "${config.minecraft.version}-${config.forge.version}"
runDir = "run"
mappings = "stable_39"
def args = [
"-Dmixin.debug.export=true",
'-Dmixin.hotSwap=true',
'-Dmixin.checks.interfaces=true'
]
replace("@VERSION@", project.version)
replaceIn("tnfcmod.java")
}
repositories {
// Repositories required for dependencies, not ForgeGradle go here.
mavenCentral()
maven {
name = "CraftTweaker Maven"
url = "https://maven.blamejared.com/"
}
maven {
// location of the maven that hosts JEI files
name = "Progwml6 maven"
url = "https://dvs1.progwml6.com/files/maven/"
}
// maven {
// name = "Hwyla maven"
// url "http://tehnut.info/maven"
// }
maven { // TOP
name 'tterrag maven'
url "https://maven.tterrag.com/"
}
maven {
name = "CoFH Maven"
url = "https://maven.covers1624.net/"
}
maven {
name = "ChickenBones Maven"
url = "http://chickenbones.net/maven/"
}
maven { // ModMaven, there is a bunch of stuff on there
name 'ModMaven'
url "http://modmaven.k-4u.nl/"
}
maven { // Shadowfacts - Forgelin
name 'Shadowfacts'
url "http://maven.shadowfacts.net/"
}
maven {
name = "Modmuss50"
url = "http://maven.modmuss50.me/"
}
maven { //Guidebook ffs
url 'http://dogforce-games.com/maven'
}
maven {
url "https://cursemaven.com"
}
maven {
name = "CleanroomMC"
url "https://maven.cleanroommc.com"
}
}
String mcVersion = config.minecraft.version
String shortVersion = mcVersion.substring(0, mcVersion.lastIndexOf('.'))
String strippedVersion = shortVersion.replace(".", "") + "0"
mixin {
add sourceSets.main, "mixins.tnfcmod.refmap.json"
}
dependencies {
deobfProvided ("CraftTweaker2:CraftTweaker2-MC${strippedVersion}-Main:${config.crafttweaker.version}")
// deobfCompile ("mezz.jei:jei_${config.minecraft.version}:${config.jei.version}")
// deobfCompile ("cofh:RedstoneFlux:1.12-2.0.1+:deobf")
deobfCompile("curse.maven:cofhcore-69162:2920433")
deobfCompile("betterwithmods:BetterWithMods:1.12-2.1.+") {
exclude group: 'mezz.jei', module:'jei_1.12.2'
exclude group: 'cofh', module:'RedstoneFlux'
}
deobfCompile "zone.rong:mixinbooter:4.2"
compile fileTree(include: ["*.jar"], dir: "libs")
compileOnly fileTree(include: ["*.jar"], dir: "libsCompile")
}
processResources {
// this will ensure that this task is redone when the versions change.
inputs.property "version", config.version
inputs.property "mc_version", config.minecraft.version
// copy mcmod.info from resources
from(sourceSets.main.resources.srcDirs) {
include "mcmod.info"
// replace version and mcversion variables/placeholders
expand "mod_version": version, "mc_version": config.minecraft.version
}
// copy everything else from resources
from(sourceSets.main.resources.srcDirs) {
exclude "mcmod.info"
}
// from the project root, include the LICENSE file
from('.') {
include "LICENSE.txt"
}
}
jar {
manifest {
attributes (['FMLAT' : 'tnfc_at.cfg',
])
}
}
// Deobf jar allows people to drop this in mod folder on a dev environment
task deobfJar(type: Jar, dependsOn: 'jar') {
from sourceSets.main.output
classifier "deobf"
}
project.tasks.withType(Jar) { jarTask -> // For all jar tasks
jarTask.appendix = "MC" + project.minecraft.version
}