This repository has been archived by the owner on May 7, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
117 lines (94 loc) · 2.92 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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
val omegaVersion: String by project
val forgeVersion: String by project
val mappingsChannel: String by project
val mappingsVersion: String by project
buildscript {
repositories {
mavenCentral()
maven("https://maven.minecraftforge.net/")
maven("https://repo.spongepowered.org/maven/")
}
dependencies {
classpath("net.minecraftforge.gradle:ForgeGradle:4.+")
classpath("org.spongepowered:mixingradle:0.7-SNAPSHOT")
}
}
plugins {
kotlin("jvm")
}
apply(plugin = "net.minecraftforge.gradle")
apply(plugin = "org.spongepowered.mixin")
group = "me.yailya"
version = omegaVersion
configure<net.minecraftforge.gradle.userdev.UserDevExtension> {
mappings(mappingsChannel, mappingsVersion)
runs {
create("client") {
workingDirectory(project.file("run"))
property("fml.coreMods.load", "me.yailya.omega.mixin.MixinLoader")
property("mixin.env.disableRefMap", "true")
property("forge.logging.markers", "SCAN,REGISTRIES,REGISTRYDUMP")
property("forge.logging.console.level", "debug")
}
}
}
configure<org.spongepowered.asm.gradle.plugins.MixinExtension> {
defaultObfuscationEnv = "searge"
add(sourceSets["main"], "mixins.omega.refmap.json")
}
repositories {
mavenCentral()
maven("https://repo.spongepowered.org/maven/")
}
configurations.create("include")
dependencies {
"minecraft"("net.minecraftforge:forge:${forgeVersion}")
"include"("org.spongepowered:mixin:0.8.5") {
exclude(module = "guava")
exclude(module = "gson")
exclude(module = "commons-io")
}
annotationProcessor("org.spongepowered:mixin:0.8.5:processor") {
exclude(module = "gson")
}
"include"(kotlin("stdlib-jdk8"))
implementation(configurations["include"])
}
tasks.processResources {
from(sourceSets["main"].resources.srcDirs) {
duplicatesStrategy = DuplicatesStrategy.INCLUDE
include("mcmod.info")
expand(mapOf(
"version" to version,
"mcversion" to "1.12.2"
))
}
}
tasks.jar {
manifest.attributes(mapOf(
"Manifest-Version" to 1.0,
"MixinConfigs" to "mixins.omega.json",
"TweakClass" to "org.spongepowered.asm.launch.MixinTweaker",
"FMLCorePluginContainsFMLMod" to "true",
"FMLCorePlugin" to "me.yailya.omega.mixin.MixinLoader",
"ForceLoadAsMod" to "true"
))
duplicatesStrategy = DuplicatesStrategy.INCLUDE
exclude(
"**/module-info.class",
"DebugProbesKt.bin",
"META-INF/versions/**",
"META-INF/**.RSA",
"META-INF/*.kotlin_module",
"LICENSE.txt",
"kotlin/**/*.kotlin_metadata",
"kotlin/**/*.kotlin_builtins",
"META-INF/*.version"
)
from(
*configurations["include"].map {
if (it.isDirectory) it else zipTree(it)
}.toTypedArray()
)
finalizedBy("reobfJar")
}