-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
113 lines (91 loc) · 2.9 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
plugins {
id 'eclipse'
id 'idea'
id 'net.minecraftforge.gradle' version '5.1.+'
id 'wtf.gofancy.fancygradle' version '1.1.+'
}
repositories {
// Curse
maven {
url = "https://cursemaven.com"
}
}
version = modVersion
group = "mod.traister101.${modID}"
archivesBaseName = "${modName}-${minecraftVersion}"
sourceCompatibility = targetCompatibility = 1.8
fancyGradle {
patches {
resources
coremods
asm
}
}
idea {
module {
downloadJavadoc = true;
// Add directory exlusions
["run", ".gradle", "build"].forEach { excludeDirs.add(file(it)) }
}
}
minecraft {
mappings channel: 'stable', version: '39-1.12'
runs {
all {
// Give MC 4gb and dissable annoying world backups
jvmArgs("-Xmx4G", "-Xms4G", "-Dfml.doNotBackup=true")
// Recommended logging level for the console
property('forge.logging.console.level', 'debug')
// Recommended logging data for a userdev environment
property('forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP')
}
client {
workingDirectory("run/client")
args("--username", "Dev")
}
server {
workingDirectory("run/server")
}
}
}
dependencies {
minecraft("net.minecraftforge:forge:1.12.2-14.23.5.2854")
// TFC
implementation(fg.deobf("curse.maven:TerraFirmaCraft-${tfcID}:${tfcFile}"))
}
jar {
from(sourceSets.main.output.resourcesDir)
manifest {
attributes([
"Specification-Title" : modName,
"Specification-Vendor" : "traister101",
"Specification-Version" : modVersion, // We are version 1 of ourselves
"Implementation-Title" : project.name,
"Implementation-Version" : project.version,
"Implementation-Vendor" : "traister101",
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
])
}
}
processResources {
duplicatesStrategy = DuplicatesStrategy.INCLUDE
// this will ensure that this task is redone when the versions change.
inputs.property("moid", project.modID)
inputs.property("modname", project.modName)
inputs.property("version", project.version)
inputs.property("mcversion", project.minecraftVersion)
// replace stuff in mcmod.info and pack.mcmeta
from(sourceSets.main.resources.srcDirs) {
include("mcmod.info", "pack.mcmeta")
// replace version, mcversion and modname
expand("modid": project.modID, "version": project.version, "modname": project.modName, "mcversion": project.minecraftVersion)
}
// copy everything else
from(sourceSets.main.resources.srcDirs) {
exclude("mcmod.info", "pack.mcmeta")
}
// Copy lisence from project root
from('.') {
include("LICENSE")
}
}