1- import org.slf4j.event.Level
2-
31plugins {
42 id(" java" )
53 id(" eclipse" )
64 id(" idea" )
75 id(" maven-publish" )
8- alias(neoforged.plugins.neogradle )
6+ alias(neoforged.plugins.moddev )
97}
108
119val modId: String = " compactmachines"
@@ -21,34 +19,29 @@ java {
2119 toolchain.languageVersion.set(JavaLanguageVersion .of(21 ))
2220}
2321
24- minecraft {
25- this .modIdentifier = modId
26- }
27-
28- runs {
29- configureEach {
30- this .modSource(coreApi.sourceSets.main.get())
31- this .modSource(sourceSets.main.get())
32- this .modSource(mainProject.sourceSets.main.get())
22+ neoForge {
23+ version = neoforged.versions.neoforge
3324
34- dependencies {
35- runtime(libraries.feather )
36- runtime(libraries.jnanoid )
37- }
25+ mods.create(modId) {
26+ this .sourceSet(coreApi.sourceSets.main.get() )
27+ this .sourceSet(sourceSets.main.get() )
28+ this .sourceSet(mainProject.sourceSets.main.get())
3829 }
3930
40- this .create(" data" ) {
41- this .dataGenerator()
31+ runs {
32+ this .create(" data" ) {
33+ this .data()
4234
43- this .workingDirectory .set(file(" runs/data" ))
35+ this .gameDirectory .set(file(" runs/data" ))
4436
45- // Comma-separated list of namespaces to load gametests from. Empty = all namespaces.
46- systemProperty(" forge.enabledGameTestNamespaces" , modId)
37+ // Comma-separated list of namespaces to load gametests from. Empty = all namespaces.
38+ systemProperty(" forge.enabledGameTestNamespaces" , modId)
4739
48- arguments.addAll(" --mod" , modId)
49- arguments.addAll(" --all" )
50- arguments.addAll(" --output" , mainProject.file(" src/generated/resources" ).absolutePath)
51- arguments.addAll(" --existing" , mainProject.file(" src/main/resources" ).absolutePath)
40+ programArguments.addAll(" --mod" , modId)
41+ programArguments.addAll(" --all" )
42+ programArguments.addAll(" --output" , mainProject.file(" src/generated/resources" ).absolutePath)
43+ programArguments.addAll(" --existing" , mainProject.file(" src/main/resources" ).absolutePath)
44+ }
5245 }
5346}
5447
@@ -67,12 +60,10 @@ repositories {
6760dependencies {
6861 compileOnly(coreApi)
6962 compileOnly(mainProject)
70-
71- compileOnly(neoforged.neoforge)
7263}
7364
7465tasks.compileJava {
75- options.encoding = " UTF-8" ;
66+ options.encoding = " UTF-8"
7667}
7768
7869tasks.withType<ProcessResources > {
0 commit comments