You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Adds support for kotlin, and adds the Polyfrost Gradle Toolkit
7
-
// which we use to prepare the environment.
8
5
plugins {
9
-
kotlin("jvm")
10
-
id("org.polyfrost.multi-version")
11
-
id("org.polyfrost.defaults.repo")
12
-
id("org.polyfrost.defaults.java")
13
-
id("org.polyfrost.defaults.loom")
14
-
id("com.github.johnrengelman.shadow")
15
-
id("net.kyori.blossom") version "1.3.1"
16
-
id("signing")
17
6
java
7
+
kotlin("jvm")
8
+
id("dev.deftu.gradle.multiversion") // Applies preprocessing for multiple versions of Minecraft and/or multiple mod loaders.
9
+
id("dev.deftu.gradle.tools") // Applies several configurations to things such as the Java version, project name/version, etc.
10
+
id("dev.deftu.gradle.tools.resources") // Applies resource processing so that we can replace tokens, such as our mod name/version, in our resources.
11
+
id("dev.deftu.gradle.tools.bloom") // Applies the Bloom plugin, which allows us to replace tokens in our source files, such as being able to use `@MOD_VERSION` in our source files.
12
+
id("dev.deftu.gradle.tools.shadow") // Applies the Shadow plugin, which allows us to shade our dependencies into our mod JAR. This is NOT recommended for Fabric mods, but we have an *additional* configuration for those!
13
+
id("dev.deftu.gradle.tools.minecraft.loom") // Applies the Loom plugin, which automagically configures Essential's Architectury Loom plugin for you.
14
+
id("dev.deftu.gradle.tools.minecraft.releases") // Applies the Minecraft auto-releasing plugin, which allows you to automatically release your mod to CurseForge and Modrinth.
18
15
}
19
16
20
-
// Gets the mod name, version and id from the `gradle.properties` file.
21
-
val mod_name:String by project
22
-
val mod_version:String by project
23
-
val mod_id:String by project
24
-
val mod_archives_name:String by project
25
-
26
-
// Sets up the variables for when we preprocess to other Minecraft versions.
27
-
preprocess {
28
-
vars.put("MODERN", if (project.platform.mcMinor >=16) 1else0)
29
-
}
30
-
31
-
// Replaces the variables in `ExampleMod.java` to the ones specified in `gradle.properties`.
32
-
blossom {
33
-
replaceToken("@VER@", mod_version)
34
-
replaceToken("@NAME@", mod_name)
35
-
replaceToken("@ID@", mod_id)
36
-
}
37
-
38
-
// Sets the mod version to the one specified in `gradle.properties`. Make sure to change this following semver!
39
-
version = mod_version
40
-
// Sets the group, make sure to change this to your own. It can be a website you own backwards or your GitHub username.
41
-
// e.g. com.github.<your username> or com.<your domain>
42
-
group ="org.polyfrost"
17
+
toolkitLoomHelper {
18
+
useOneConfig {
19
+
version ="1.0.0-alpha.55"
20
+
loaderVersion ="1.1.0-alpha.35"
43
21
44
-
// Sets the name of the output jar (the one you put in your mods folder and send to other people)
45
-
// It outputs all versions of the mod into the `build` directory.
46
-
base {
47
-
archivesName.set("$mod_archives_name-$platform")
48
-
}
22
+
usePolyMixin =true
23
+
polyMixinVersion ="0.8.4+build.2"
49
24
50
-
// Configures the Polyfrost Loom, our plugin fork to easily set up the programming environment.
51
-
loom {
52
-
// Removes the server configs from IntelliJ IDEA, leaving only client runs.
53
-
// If you're developing a server-side mod, you can remove this line.
54
-
noServerRunConfigs()
25
+
applyLoaderTweaker =true
55
26
56
-
// Adds the tweak class if we are building legacy version of forge as per the documentation (https://docs.polyfrost.org)
0 commit comments