generated from xpdustry/template-plugin
-
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.
- Loading branch information
Showing
17 changed files
with
678 additions
and
364 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
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
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 |
---|---|---|
@@ -1,62 +1,56 @@ | ||
# template-plugin | ||
# slf4md | ||
|
||
[![Build status](https://github.com/xpdustry/template-plugin/actions/workflows/build.yml/badge.svg?branch=master&event=push)](https://github.com/xpdustry/template-plugin/actions/workflows/build.yml) | ||
[![Mindustry 7.0 ](https://img.shields.io/badge/Mindustry-7.0-ffd37f)](https://github.com/Anuken/Mindustry/releases) | ||
[![Mindustry 7.0](https://img.shields.io/badge/Mindustry-7.0-ffd37f)](https://github.com/Anuken/Mindustry/releases) | ||
|
||
Get your Mindustry plugin started with this awesome template repository, it features: | ||
## Description | ||
|
||
- GitHub actions for easier testing (the plugin is built for each commit and pull request). | ||
A set of plugins providing various SLF4J implementations for Mindustry. | ||
|
||
- [Toxopid](https://plugins.gradle.org/plugin/com.xpdustry.toxopid) Gradle plugin for faster Mindustry plugin | ||
development and testing. | ||
## Installation | ||
|
||
- [Indra](https://plugins.gradle.org/plugin/net.kyori.indra) Gradle plugin for easier java development. | ||
The plugins require: | ||
|
||
- Bundling and automatic relocation (isolating your dependencies to avoid class loading issues) with the | ||
[Shadow](https://imperceptiblethoughts.com/shadow/) gradle plugin. | ||
- Java 17 or above. | ||
|
||
- Unused classes are removed from the final jar. | ||
- Mindustry v146 or above. | ||
|
||
- A `CHANGELOG.md` file that will be updated automatically when you create a release on GitHub. | ||
## Usage | ||
|
||
## How to use | ||
### For server owners | ||
|
||
1. Update the `build.gradle.kts`, `settings.gradle.kts` and `plugin.json` files with your plugin data. | ||
If one of your plugins requires `slf4md`, you don't have to do anything special. | ||
Simply choose the implementation that suits your needs and install it on your server (in the `config/mods` directory): | ||
|
||
2. Clear `CHANGELOG.md` and update `LICENSE.md` with your name (or completely changing the license if needed) | ||
- `slf4md-simple`: A logger that redirects to arc logger (`arc.util.Log`). No fancy stuff or invasive changes. | ||
|
||
3. Start **K O D I N G**. | ||
### For plugin developers | ||
|
||
4. When ready for a release, push your last changes with the release version. Then create a release on GitHub. Once published, the plugin jar will be built and added to the release and the `CHANGELOG.md` file will be updated with the release notes of the GitHub release. | ||
You only need to "compileOnly" `slf4j-api` in your `build.gradle`: | ||
|
||
## Installation | ||
```gradle | ||
repositories { | ||
mavenCentral() | ||
} | ||
This plugin requires : | ||
dependencies { | ||
compileOnly("org.slf4j:slf4j-api:2.0.13") | ||
} | ||
``` | ||
|
||
- Java 17 or above. | ||
and add `slf4md` in the dependencies of your `plugin.json`: | ||
|
||
- Mindustry v146 or above. | ||
```json | ||
{ | ||
"dependencies": ["slf4md"] | ||
} | ||
``` | ||
|
||
## Building | ||
|
||
- `./gradlew shadowJar` to compile the plugin into a usable jar (will be located | ||
- `./gradlew :slf4md-{module}:shadowJar` to compile the plugin into a usable jar (will be located | ||
at `builds/libs/(plugin-name).jar`). | ||
|
||
- `./gradlew runMindustryServer` to run the plugin in a local Mindustry server. | ||
|
||
- `./gradlew runMindustryDesktop` to start a local Mindustry client that will let you test the plugin. | ||
- `./gradlew :slf4md-{module}:runMindustryServer` to run the plugin in a local Mindustry server. | ||
|
||
## Note | ||
|
||
If you are from Xpdustry, before doing anything, run this in your terminal to set the `xpdustry-master` branch as master : | ||
|
||
```bash | ||
git fetch origin xpdustry-master | ||
git checkout xpdustry-master | ||
git branch -m master old-master | ||
git branch -m xpdustry-master master | ||
git branch -rD origin/master | ||
git push origin master -f | ||
git branch -D old-master | ||
git push origin --delete xpdustry-master | ||
``` | ||
- `./gradlew :slf4md-{module}:runMindustryDesktop` to start a local Mindustry client that will let you test the plugin. |
Oops, something went wrong.