-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Restructure project into multiple Gradle modules #180
Comments
We can address this and #176 after I review your PR |
I could see things getting tricky in the implementation here, specifically when reading resources or classes in other modules. For instance the |
This is something I want to tackle sooner rather than later. I like your idea and was thinking of this structure for the future (0.5.0 -> 1.0). Plugins are also loaded using
Tools should be shipped separately IMO but that's up for debate |
The updates you've made to the structure look good. After some further thought, there's two caveats that I'd like to address here.
|
By separating event base classes from specific implementations, we'll be able to re-use abstract components in a modular fashion. This change results in the following: * `io.luna.event` package that contains all event abstractions that are not tied to game logic. * `io.luna.game.events` package that contains specific implementations of those abstractions solely used for game logic. Contributes to luna-rs#180
Problem(s)
The current single module project is large, and cluttered. This creates two problems.
If I want to create an extension, plugin, or tool, I have to rummage through the entire repository to find all of the code related to that feature.
If I'm testing a core game feature, I have to compile the entire project (including those pesky kotlin files that have a long compilation time).
Solution
Creating a multi-module Gradle project allows us compile only the required modules, instead of the entire application, when unit testing or manually debugging the server after changes are made. But we can reduce build times even more.
Builds on modules that use sub-modules as dependencies, by default, do so sequentially. We can leverage Gradle to execute builds in parallel, as long as these modules are decoupled, and do not share state.
From Gradle:
The Resulting Project Structure
This is just my opinion of the best project structure at this point. The features listed may or may not exist, but are listed to convey how extensible the project can get. Any and all feedback or improvements are welcome.
The text was updated successfully, but these errors were encountered: