-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from FantasyFrontiers/documentation/1-developer…
…-documentation Basic Developer Documentation
- Loading branch information
Showing
4 changed files
with
158 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE rules SYSTEM "https://resources.jetbrains.com/writerside/1.0/redirection-rules.dtd"> | ||
<rules> | ||
<!-- format is as follows | ||
<rule id="<unique id>"> | ||
<accepts>page.html</accepts> | ||
</rule> | ||
--> | ||
<rule id="2d3b7759"> | ||
<description>Created after removal of "Contributing to Fantasy Frontiers" from Fantasy Frontiers</description> | ||
<accepts>Contribution-Guidelines.html</accepts> | ||
</rule> | ||
</rules> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
# Contributing to Fantasy Frontiers | ||
We love your input! We want to make contributing to this project as easy and transparent as possible, whether it's: | ||
|
||
- Reporting a bug | ||
- Discussing the current state of the code | ||
- Submitting a fix | ||
- Proposing new features (and implement them if you want) | ||
- Becoming a maintainer | ||
- Help us translate on [Weblate](https://weblate.flawcra.cc/projects/fantasy-frontiers/translations/) | ||
|
||
## We Develop with Github | ||
We use github to host code, to track issues and feature requests, as well as accept pull requests. | ||
|
||
## We Use [Github Flow](https://guides.github.com/introduction/flow/index.html), So All Code Changes Happen Through Pull Requests | ||
Pull requests are the best way to propose changes to the codebase (we use [Github Flow](https://guides.github.com/introduction/flow/index.html)). We actively welcome your pull requests: | ||
|
||
1. Fork the repo and create your branch from `main`. | ||
2. If you've added code that should be tested, add tests. (ik.. nobody ever does that) | ||
3. If you've changed APIs, update the documentation for them. | ||
4. Ensure the test suite passes (or at least that the project builds). | ||
5. Make sure your code lints. | ||
6. Issue that pull request! | ||
|
||
## Any contributions you make will be under the GPL 3.0 Software License | ||
In short, when you submit code changes, your submissions are understood to be under the same [GPL 3.0](https://choosealicense.com/licenses/gpl-3.0/) that covers the project. Feel free to contact the maintainers if that's a concern. | ||
|
||
## Report bugs using Github's [issues](https://github.com/CoasterFreakDE/FantasyFrontiers/issues) | ||
We use GitHub issues to track public bugs. Report a bug by [opening a new issue](https://github.com/CoasterFreakDE/FantasyFrontiers/issues/new/choose); it's that easy! | ||
|
||
## Write bug reports with detail, background, and sample code | ||
[This is an example](http://stackoverflow.com/q/12488905/180626) of a good bug report. Here's [another example from Craig Hockenberry](http://www.openradar.me/11905408). | ||
|
||
**Great Bug Reports** tend to have: | ||
|
||
- A quick summary and/or background | ||
- Steps to reproduce | ||
- Be specific! | ||
- Give sample code if you can. [The stackoverflow question](http://stackoverflow.com/q/12488905/180626) includes sample code that *anyone* with a base R setup can run to reproduce | ||
- What you expected would happen | ||
- What actually happens | ||
- Notes (possibly including why you think this might be happening, or stuff you tried that didn't work) | ||
|
||
People *love* thorough bug reports. I'm not even kidding. | ||
|
||
## Use a Consistent Coding Style | ||
|
||
* Stay close to the languages code style | ||
* You can look them up at [kotlinlang.org](https://kotlinlang.org/docs/coding-conventions.html) | ||
|
||
## License | ||
By contributing, you agree that your contributions will be licensed under its GPL 3.0 License. | ||
|
||
## References | ||
This document was adapted from the open-source contribution guidelines for [Facebook's Draft](https://github.com/facebook/draft-js/blob/main/CONTRIBUTING.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
# Developer Documentation | ||
|
||
## Introduction | ||
|
||
This section provides an overview of the project, its purpose, and objectives. | ||
|
||
--- | ||
|
||
## Prerequisites | ||
|
||
### Software Requirements | ||
|
||
- Java 17 or higher | ||
- Gradle | ||
|
||
--- | ||
|
||
## Setup and Installation | ||
|
||
### Installing Java | ||
|
||
- Install a Java 17+ Development Kit of your choice. We recommend [Adoptium Eclipse Temurin](https://adoptium.net/) | ||
|
||
### Installing Gradle | ||
|
||
- Follow the instructions to install Gradle [here](https://gradle.org/install/). | ||
|
||
### Loading Dependencies | ||
|
||
- After cloning the repository, navigate to the project root and run the following command to load dependencies: | ||
``` | ||
gradle --refresh-dependencies | ||
``` | ||
- If you use IntelliJ (or any other advanced IDE), this step will be done automatically upon loading (see [Development Environment](#development-environment)). | ||
|
||
--- | ||
|
||
## Development Environment | ||
|
||
For development, we recommend using IntelliJ IDEA. You can download it [here](https://www.jetbrains.com/idea/download/). | ||
You will also need a database for development. We recommend using [MariaDB](https://mariadb.org/). | ||
Additionally, you will need a Discord bot token. You can get one by creating a new application [here](https://discord.com/developers/applications). | ||
|
||
### Setting up IntelliJ | ||
|
||
- Open IntelliJ and select "Open or Import". | ||
- Navigate to the project root and select `Open as Project`. | ||
- Wait for IntelliJ to load the project and import all gradle dependencies. | ||
- Once the project is loaded, copy the `.env.example` file and rename it to `.env`. | ||
- Fill in the values in the `.env` file with your database and Discord bot credentials. | ||
- Run the `Main` class to start the bot. | ||
- You can use the `migrate` flag to seed the database with the default data. This is only necessary for the first run. | ||
- You can now use IntelliJ to develop the project. | ||
|
||
--- | ||
|
||
## Building the Project | ||
|
||
1. Navigate to the project root. | ||
2. Run the following command to build the project: | ||
``` | ||
gradle build | ||
``` | ||
3. The shadowed JAR file (for production use) will be generated in `build/libs`. | ||
|
||
--- | ||
|
||
## Contributing Guidelines | ||
|
||
Please read our [Contribution Guidelines](contribution-guidelines.md) before contributing to the project. | ||
|
||
--- | ||
|
||
## Common Issues and Troubleshooting | ||
|
||
This section lists common issues that developers might encounter and provides solutions or workarounds. | ||
|
||
### Gradle Build Errors | ||
|
||
- If you encounter any errors while building the project, try running the following command: | ||
``` | ||
gradle clean | ||
``` | ||
- If the error persists, try deleting the `.gradle` folder in the project root and running the `--refresh-dependencies` command again. | ||
|
||
### IntelliJ Errors | ||
|
||
- If you encounter any errors while loading the project in IntelliJ, try invalidating the cache and restarting IntelliJ. |