@@ -17,6 +17,7 @@ val mod_id: String by extra
1717val isRelease: Boolean = (System .getenv(" CC_RELEASE" ) ? : " false" ).equals(" true" , true )
1818
1919val neoforge_version: String by extra
20+ val coreVersion: String = property(" core_version" ) as String
2021
2122base {
2223 archivesName.set(mod_id)
@@ -32,6 +33,7 @@ jarJar.enable()
3233
3334configurations {
3435 create(" mcLibrary" ) {}
36+
3537 implementation {
3638 extendsFrom(configurations.findByName(" mcLibrary" ))
3739 }
6466 systemProperty(" forge.logging.console.level" , " debug" )
6567
6668 dependencies {
67- runtime(configuration(configurations.findByName(" mcLibrary" )))
69+ // runtime("dev.compactmods.compactcrafting:core-api:$coreVersion")
70+ runtime(" io.reactivex.rxjava3:rxjava:3.1.5" )
6871 }
6972
7073 // ideaModule("Compact_Crafting.forge-main.main")
@@ -74,27 +77,30 @@ runs {
7477 create(" client" ) {
7578 // Comma-separated list of namespaces to load gametests from. Empty = all namespaces.
7679 systemProperty(" forge.enabledGameTestNamespaces" , mod_id)
80+
81+ programArguments(" --username" , " Nano" )
82+ programArguments(" --width" , " 1920" )
83+ programArguments(" --height" , " 1080" )
7784 }
7885
79- // server {
80- // systemProperty 'forge.enabledGameTestNamespaces', project.mod_id
81- // programArgument '--nogui'
82- // }
83- //
84- // // This run config launches GameTestServer and runs all registered gametests, then exits.
85- // // By default, the server will crash when no gametests are provided.
86- // // The gametest system is also enabled by default for other run configs under the /test command.
87- // gameTestServer {
88- // systemProperty 'forge.enabledGameTestNamespaces', project.mod_id
89- // }
90- //
91- // data {
92- // // example of overriding the workingDirectory set in configureEach above, uncomment if you want to use it
93- // // workingDirectory project.file('run-data')
94- //
95- // // Specify the modid for data generation, where to output the resulting resource, and where to look for existing resources.
96- // programArguments.addAll '--mod', project.mod_id, '--all', '--output', file('src/generated/resources/').getAbsolutePath(), '--existing', file('src/main/resources/').getAbsolutePath()
97- // }
86+ create(" server" ) {
87+ workingDirectory(file(" run/server" ))
88+ environmentVariables(" CC_TEST_RESOURCES" , project.file(" src/test/resources" ).path)
89+ }
90+
91+ create(" data" ) {
92+ workingDirectory(file(" run/data" ))
93+
94+ programArguments(" --mod" , " compactcrafting" )
95+ programArguments(" --all" )
96+ programArguments(" --output" , file(" src/generated/resources/" ).path)
97+ programArguments(" --existing" , file(" src/main/resources" ).path)
98+ }
99+
100+ create(" gameTestServer" ) {
101+ workingDirectory(file(" run/gametest" ))
102+ environmentVariables(" CC_TEST_RESOURCES" , file(" src/test/resources" ).path)
103+ }
98104}
99105
100106repositories {
@@ -109,89 +115,19 @@ repositories {
109115 }
110116}
111117
112- val coreVersion: String = property(" core_version" ) as String
113118dependencies {
114119 implementation(" net.neoforged:neoforge:${neoforge_version} " )
115120
116- implementation(" dev.compactmods.compactcrafting" , " core-api" , coreVersion)
117- " mcLibrary " ( jarJar(" dev.compactmods.compactcrafting" , " core-api" , " [$coreVersion ]" ) {
118- isTransitive = false
119- })
121+ // implementation("dev.compactmods.compactcrafting", "core-api", coreVersion)
122+ // jarJar("dev.compactmods.compactcrafting", "core-api", "[$coreVersion]") {
123+ // isTransitive = false
124+ // }
120125
121- " mcLibrary " ( implementation(" io.reactivex.rxjava3" , " rxjava" , " 3.1.5" ) )
126+ implementation(" io.reactivex.rxjava3" , " rxjava" , " 3.1.5" )
122127 jarJar(" io.reactivex.rxjava3" , " rxjava" , " [3.1.0,3.2)" )
123128 jarJar(" org.reactivestreams" , " reactive-streams" , " [1.0.4,)" )
124129}
125130
126- //
127- // minecraft {
128- // mappings("parchment", parchment_version)
129- //
130- // // makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable.
131- // accessTransformer(file("src/main/resources/META-INF/accesstransformer.cfg"))
132- //
133- // // Default run configurations.
134- // // These can be tweaked, removed, or duplicated as needed.
135- // runs {
136- // all {
137- // property("mixin.env.remapRefMap", "true")
138- // property("mixin.env.refMapRemappingFile", "${buildDir}/createSrgToMcp/output.srg")
139- //
140- //
141- //
142- // ideaModule("Compact_Crafting.forge-main.main")
143- //
144- // mods.create(mod_id) {
145- // source(sourceSets.main.get())
146- // for (p in runDepends)
147- // source(p.sourceSets.main.get())
148- // }
149- // }
150- //
151- // create("client") {
152- // taskName("runClient")
153- // workingDirectory(file("run/client"))
154- //
155- // args("--username", "Nano")
156- // args("--width", 1920)
157- // args("--height", 1080)
158- // }
159- //
160- // create("server") {
161- // taskName("runServer")
162- // workingDirectory(file("run/server"))
163- // environment("CC_TEST_RESOURCES", file("src/test/resources"))
164- //
165- // mods.named(mod_id) {
166- // source(sourceSets.test.get())
167- // }
168- // }
169- //
170- // create("data") {
171- // taskName("runData")
172- // workingDirectory(file("run/data"))
173- //
174- // args("--mod", "compactcrafting")
175- // args("--all")
176- // args("--output", file("src/generated/resources/"))
177- // args("--existing", file("src/main/resources"))
178- //
179- // forceExit(false)
180- // }
181- //
182- // create("gameTestServer") {
183- // taskName("runGameTestServer")
184- // workingDirectory(file("run/gametest"))
185- // environment("CC_TEST_RESOURCES", file("src/test/resources"))
186- //
187- // forceExit(false)
188- //
189- // mods.named(mod_id) {
190- // source(sourceSets.test.get())
191- // }
192- // }
193- // }
194- // }
195131//
196132// repositories {
197133// mavenLocal()
@@ -236,6 +172,7 @@ dependencies {
236172// runtimeOnly(fg.deobf("curse.maven:spark-361579:3875647"))
237173// }
238174//
175+
239176tasks.withType<ProcessResources > {
240177 duplicatesStrategy = DuplicatesStrategy .EXCLUDE
241178}
0 commit comments