-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle.kts
94 lines (85 loc) · 3.24 KB
/
build.gradle.kts
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
buildscript {
repositories {
mavenCentral()
jcenter()
maven {
setUrl("http://files.minecraftforge.net/maven")
}
maven {
setUrl("http://repo.spongepowered.org/maven")
}
maven {
setUrl("https://plugins.gradle.org/m2/")
}
}
dependencies {
classpath("net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT")
}
}
val theForgeVersion: String by project
val theMappingsVersion: String by project
allprojects {
apply {
plugin<BasePlugin>()
plugin<JavaPlugin>()
plugin<IdeaPlugin>()
plugin("io.github.opencubicchunks.gradle.fg2fixed")
plugin("io.github.opencubicchunks.gradle.remapper")
plugin("io.github.opencubicchunks.gradle.mcGitVersion")
}
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
idea {
module.apply {
inheritOutputDirs = true
}
module.isDownloadJavadoc = true
module.isDownloadSources = true
}
mcGitVersion {
isSnapshot = true
}
minecraft {
version = theForgeVersion
runDir = "run"
mappings = theMappingsVersion
replace("@@VERSION@@", project.version.toString())
replace("public static final boolean IS_DEV = true;", "public static final boolean IS_DEV = false;")
replaceIn("io/github/opencubicchunks/cubicchunks/core/CubicChunks.java")
replace("@@MALISIS_VERSION@@", "1.12.2-6.5.1")
replaceIn("io/github/opencubicchunks/cubicchunks/cubicgen/CustomCubicMod.java")
val args = listOf(
"-Dfml.coreMods.load=" + //the core mod class, needed for mixins
"io.github.opencubicchunks.cubicchunks.core.asm.coremod.CubicChunksCoreMod," +
"io.github.opencubicchunks.cubicchunks.cubicgen.asm.coremod.CubicGenCoreMod",
"-Dmixin.env.compatLevel=JAVA_8", //needed to use java 8 when using mixins
"-Dmixin.debug.verbose=true", //verbose mixin output for easier debugging of mixins
"-Dmixin.debug.export=true", //export classes from mixin to runDirectory/.mixin.out
"-Dcubicchunks.debug=true", //various debug options of cubic chunks mod. Adds items that are not normally there!
"-XX:-OmitStackTraceInFastThrow", //without this sometimes you end up with exception with empty stacktrace
"-Dmixin.checks.interfaces=true", //check if all interface methods are overriden in mixin
"-Dfml.noGrab=false", //change to disable Minecraft taking control over mouse
"-ea", //enable assertions
"-da:io.netty..." //disable netty assertions because they sometimes fail
)
clientJvmArgs.addAll(args)
serverJvmArgs.addAll(args)
}
repositories {
mavenLocal()
mavenCentral()
jcenter()
maven {
setUrl("https://oss.sonatype.org/content/repositories/public/")
}
maven {
setUrl("http://repo.spongepowered.org/maven")
}
}
}
dependencies {
implementation(project(":CubicChunks"))
implementation(project(":CubicWorldGen"))
}