forked from ACGaming/HotOrNotPlus
-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.gradle
92 lines (75 loc) · 2.47 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
buildscript {
repositories {
maven { url = "https://files.minecraftforge.net/maven" }
}
dependencies {
classpath "net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT"
}
}
apply plugin: "net.minecraftforge.gradle.forge"
version = modVersion
group = modGroup
archivesBaseName = modBaseName
sourceCompatibility = targetCompatibility = 1.8
repositories {
mavenCentral()
// Curse
maven {
url = "https://cursemaven.com"
}
// JEI
maven {
name = "Progwml6 maven"
url = "https://dvs1.progwml6.com/files/maven/"
}
// JEI fallback
maven {
name = "ModMaven"
url = "https://modmaven.dev"
}
}
minecraft {
version = "${project.minecraftVersion}-${project.forgeVersion}"
runDir = "run"
mappings = project.minecraftMappings
clientJvmArgs += "-Xmx4G"
clientJvmArgs += "-Xms4G"
clientRunArgs += ["--username", "Dev"]
clientJvmArgs += "-Dfml.doNotBackup=true"
replace("\${MODID}", project.modID)
replace("\${MODNAME}", project.modName)
replace("\${VERSION}", project.modVersion)
replaceIn("${project.modClass}.java")
}
dependencies {
deobfCompile("curse.maven:TerraFirmaCraft-${project.tfcProjectID}:${project.tfcProjectFile}")
// Compile against the JEI API but do not include it at runtime
deobfProvided("mezz.jei:jei_${project.minecraftVersion}:4.15.0.291:api")
// At runtime, use the full JEI jar
runtime("mezz.jei:jei_${project.minecraftVersion}:4.15.0.291")
}
processResources {
// this will ensure that this task is redone when the versions change.
inputs.property("moid", modID)
inputs.property("modname", modName)
inputs.property("version", project.version)
inputs.property("mcversion", project.minecraft.version)
// replace stuff in mcmod.info and pack.mcmeta
from(sourceSets.main.resources.srcDirs) {
include("mcmod.info", "pack.mcmeta")
// replace version, mcversion, modid, and modname
expand("version": project.version, "mcversion": project.minecraft.version, "modname": modName, "modid": modID)
}
// copy everything else
from(sourceSets.main.resources.srcDirs) {
exclude("mcmod.info", "pack.mcmeta")
}
// Copy lisence from project root
from(".") {
include("LICENSE")
}
}
project.tasks.withType(Jar) { jarTask ->
// Add the minecraft version to result in HotOrNotPlus-${mcversion}-${version}
jarTask.appendix = project.minecraft.version
}