Nanoware / Terasology

Terasology is an open source project started by Benjamin "begla" Glatzel to research procedural terrain generation and efficient rendering techniques in Java using the LWJGL. The engine uses a block-based voxel-like approach as seen in Minecraft. After proving itself as a solid tech demo begla was joined at first by Anton "small-jeeper" Kireev and Rasmus "Cervator" Praestholm and a full-fledged game concept was born. Our goal is a game that pays ample tribute to Minecraft in initial look and origin, but stakes out its own niche by adopting the NPC-helper and caretaker feel from such games as Dwarf Fortress and Dungeon Keeper, while striving for added depth and sophistication in the foundation systems akin to DF.
http://terasology.org/
Apache License 2.0
4 stars 1 forks source link

add sourceset for cli config #91

Closed pollend closed 4 years ago

pollend commented 4 years ago

here is a source set configuration for gradle.

Cervator commented 4 years ago

I'm merging this with some minor adjustments, thanks for getting it started @pollend 👍

Although then I'm going to park it in a separate branch for now - I want to see how minimal I can make it first, by eliminating dependencies and meta stuff rather than adding :-)

The Gradle path including being able to build a jar is more of a down the road type thing. Will get back to it and have this parked as an example for then

In this context I moved the stuff to a potentially better home under gradle/ since it isn't really config, but it does relate to the build system (structure). Have in mind moving some similar things like that later. Also fixed up the pathing a bit so it is default and needs less config, and downgraded the version of Groovy.

https://github.com/Nanoware/Terasology/tree/gooeyCLIviaGradle + https://github.com/Nanoware/Terasology/commit/81eef5a682bdbc11e3d16e6790a1a46f60f7dc83

Feel free giving it a test just to validate that it works on your system still.

Cervator commented 4 years ago

Hmm... on second thought, it could probably be left in and just remain passive of sorts - you don't have to invoke the Gradle bits in a new workspace. You'd end up pulling the new dependencies as part of any sort of gradlew call including importing via Gradle into an IDE, but considering how much that does already that's probably not a huge deal. By the time you run gw it solely runs it all as a script via the wrapper.

Then later it could be switched over to a separate repo so the extras don't need to stay in the engine workspace, but could optionally be embedded for easier development. Then there's just be some tiny bootstrapper script called by the Groovy wrapper that'd @Grab the GooeyCLI and run it ...

Cervator commented 4 years ago

But now it fails the build since it gets pulled into actual engine builds, then starts complaining about Ivy. argh :-)

Cervator commented 4 years ago

This fixes that part: https://github.com/Nanoware/Terasology/commit/1167882ebc249bb7933e3830d21d3bfda9571fc6