Skip to content

Commit c673955

Browse files
committed
dgt single version examplemod yeah
1 parent 682bb6a commit c673955

File tree

5 files changed

+13
-50
lines changed

5 files changed

+13
-50
lines changed

build.gradle.kts

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
11
@file:Suppress("UnstableApiUsage", "PropertyName")
22

33
import dev.deftu.gradle.utils.GameSide
4-
import dev.deftu.gradle.utils.MinecraftVersion
54

65
plugins {
76
java
8-
kotlin("jvm")
9-
id("dev.deftu.gradle.multiversion") // Applies preprocessing for multiple versions of Minecraft and/or multiple mod loaders.
10-
id("dev.deftu.gradle.tools") // Applies several configurations to things such as the Java version, project name/version, etc.
11-
id("dev.deftu.gradle.tools.resources") // Applies resource processing so that we can replace tokens, such as our mod name/version, in our resources.
12-
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.
13-
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!
14-
id("dev.deftu.gradle.tools.minecraft.loom") // Applies the Loom plugin, which automagically configures Essential's Architectury Loom plugin for you.
15-
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.
7+
kotlin("jvm") version("2.0.0")
8+
val dgtVersion = "2.17.0"
9+
id("dev.deftu.gradle.tools") version(dgtVersion) // Applies several configurations to things such as the Java version, project name/version, etc.
10+
id("dev.deftu.gradle.tools.resources") version(dgtVersion) // 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") version(dgtVersion) // 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") version(dgtVersion) // 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") version(dgtVersion) // Applies the Loom plugin, which automagically configures Essential's Architectury Loom plugin for you.
14+
id("dev.deftu.gradle.tools.minecraft.releases") version(dgtVersion) // Applies the Minecraft auto-releasing plugin, which allows you to automatically release your mod to CurseForge and Modrinth.
1615
}
1716

1817
toolkitLoomHelper {
@@ -42,9 +41,4 @@ toolkitLoomHelper {
4241
// Configures the Mixin tweaker if we are building for Forge.
4342
useForgeMixin(modData.id)
4443
}
45-
46-
// Sets up the KotlinForForge library for Forge 1.16.5+ and NeoForge.
47-
if (mcData.isForgeLike && mcData.version >= MinecraftVersion.VERSION_1_16_5) {
48-
useKotlinForForge()
49-
}
5044
}

gradle.properties

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,8 @@ mod.id=examplemod
1515
mod.version=1.0.0
1616
# Sets the Maven group ID of your mod. This is effectively unused but is good practice to set regardless.
1717
mod.group=com.example
18+
19+
# Configures the mod loader that we're developing for.
20+
loom.platform=forge
21+
# Configures the Minecraft version that we're developing for.
22+
minecraft.version=1.8.9

root.gradle.kts

Lines changed: 0 additions & 14 deletions
This file was deleted.

settings.gradle.kts

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -21,31 +21,10 @@ pluginManagement {
2121
gradlePluginPortal()
2222
mavenCentral()
2323
}
24-
25-
plugins {
26-
kotlin("jvm") version("2.0.0")
27-
id("dev.deftu.gradle.multiversion-root") version("2.17.0")
28-
}
2924
}
3025

3126
val projectName: String = extra["mod.name"]?.toString()
3227
?: throw MissingPropertyException("mod.name has not been set.")
3328

3429
// Configures the root project Gradle name based on the value in `gradle.properties`
3530
rootProject.name = projectName
36-
rootProject.buildFileName = "root.gradle.kts"
37-
38-
// Adds all of our build target versions to the classpath if we need to add version-specific code.
39-
// Update this list if you want to remove/add a version and/or mod loader.
40-
// The format is: version-modloader (f.ex: 1.8.9-forge, 1.17.1-fabric, etc)
41-
// **REMEMBER TO ALSO UPDATE THE `root.gradle.kts` AND `build.gradle.kts` FILES WITH THE NEW VERSION(S).
42-
listOf(
43-
"1.8.9-forge",
44-
// ...
45-
).forEach { version ->
46-
include(":$version")
47-
project(":$version").apply {
48-
projectDir = file("versions/$version")
49-
buildFileName = "../../build.gradle.kts"
50-
}
51-
}

versions/mainProject

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)