Closed pollend closed 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.
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 ...
But now it fails the build since it gets pulled into actual engine builds, then starts complaining about Ivy. argh :-)
This fixes that part: https://github.com/Nanoware/Terasology/commit/1167882ebc249bb7933e3830d21d3bfda9571fc6
here is a source set configuration for gradle.