-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
57 lines (46 loc) · 1.32 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
buildscript {
repositories {
mavenCentral()
maven { url = "https://maven.minecraftforge.net/" }
}
dependencies {
classpath group: "net.minecraftforge.gradle", name: "ForgeGradle", version: "5.1.+"
}
}
apply plugin: "java"
apply plugin: "net.minecraftforge.gradle"
java.toolchain.languageVersion = JavaLanguageVersion.of(8)
compileJava {
sourceCompatibility = "8"
targetCompatibility = "8"
}
repositories {
maven {
url = "https://maven.minecraftforge.net/"
}
}
dependencies {
minecraft "net.minecraftforge:forge:1.12.2-14.23.5.2860"
}
minecraft {
mappings channel: "stable", version: "39-1.12"
runs {
"client" {
workingDirectory file("./run")
mods { "${project.name}" { source sourceSets.main } }
}
"server" {
workingDirectory file("./run/server")
mods { "${project.name}" { source sourceSets.main } }
}
}
}
processResources {
inputs.property "version", project.version
filesMatching("mcmod.info") {
expand "version": project.version
}
}
//When Forge 1.12 loads mods from a directory that's been put on the classpath, it expects to find resources in the same directory.
//Default Gradle behavior puts resources in ./build/resources/main instead of ./build/classes/main/java. Let's change that.
sourceSets.all { it.output.resourcesDir = it.output.classesDirs.getFiles().iterator().next() }