Skip to content

Commit

Permalink
feat: Init
Browse files Browse the repository at this point in the history
  • Loading branch information
phinner committed Jun 11, 2024
1 parent 81dc7b2 commit 8473a79
Show file tree
Hide file tree
Showing 17 changed files with 678 additions and 364 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,14 @@ jobs:
echo "STATUS=release" >> $GITHUB_ENV
fi
- name: Publish to Xpdustry
if: ${{ env.STATUS == 'release' || startsWith(github.ref, 'refs/heads/master') || startsWith(github.ref, 'refs/heads/dev') }}
run: ./gradlew publish
env:
ORG_GRADLE_PROJECT_xpdustryUsername: "${{ secrets.XPDUSTRY_MAVEN_USERNAME }}"
ORG_GRADLE_PROJECT_xpdustryPassword: "${{ secrets.XPDUSTRY_MAVEN_PASSWORD }}"
ORG_GRADLE_PROJECT_signingKey: "${{ secrets.XPDUSTRY_MAVEN_SIGNING_KEY }}"
ORG_GRADLE_PROJECT_signingPassword: "${{ secrets.XPDUSTRY_MAVEN_SIGNING_PASSWORD }}"
# - name: Publish to Xpdustry
# if: ${{ env.STATUS == 'release' || startsWith(github.ref, 'refs/heads/master') || startsWith(github.ref, 'refs/heads/dev') }}
# run: ./gradlew publish
# env:
# ORG_GRADLE_PROJECT_xpdustryUsername: "${{ secrets.XPDUSTRY_MAVEN_USERNAME }}"
# ORG_GRADLE_PROJECT_xpdustryPassword: "${{ secrets.XPDUSTRY_MAVEN_PASSWORD }}"
# ORG_GRADLE_PROJECT_signingKey: "${{ secrets.XPDUSTRY_MAVEN_SIGNING_KEY }}"
# ORG_GRADLE_PROJECT_signingPassword: "${{ secrets.XPDUSTRY_MAVEN_SIGNING_PASSWORD }}"

- name: Upload Artifacts to Release
if: ${{ env.STATUS == 'release' && github.event_name == 'release' }}
Expand Down
143 changes: 0 additions & 143 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,146 +4,3 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/),
and this project adheres to [Semantic Versioning](http://semver.org/).

## v3.5.0 - 2023-11-07

### Changes

- Complete refresh of the template to be up to date.
- Made the README simpler.
- Moved all configuration inside buildscript instead of being split into several files.

## v3.4.0 - 2023-01-07

### Changes

- Better README.

### Chores

- Bump dependencies.

## v3.3.0 - 2022-11-08

### Changes

- Switched the nullness annotations from jetbrains to checker (checker is better).

### Features

- Added option to enable/disable `-SNAPSHOT` suffix.

### Fixes

- Fixes a bug where java 8 is set as the project version.

### Chores

- Bumped workflow tasks.
- Reworked the `README.md` to be simpler.

## v3.2.0 - 2022-10-08

### 💊 Bugfixes

- removed initial sha lookup in release-drafter

### 🧹 Chore

- bump dependencies
- fix ci formatting
- fix doc changelog

## v3.1.0 - 2022-05-23

### 🚀 New Features

- Release drafter is now a manual workflow

## v3.0.4 - 2022-05-23

### Changes

- Got rid of release-please...

### 💊 Bugfixes

- fixed missing status task in build workflow

## [v3.0.3](https://github.com/Xpdustry/TemplatePlugin/compare/v3.0.3-SNAPSHOT...v3.0.3) - 2022-05-22

### Miscellaneous Chores

- release 3.0.3 ([ef49fd2](https://github.com/Xpdustry/TemplatePlugin/commit/ef49fd26dc65b14449a1ca58985e8da2aaa43f62))

## [v3.0.2](https://github.com/Xpdustry/TemplatePlugin/compare/v3.0.1...v3.0.2) - 2022-05-21

### Bug Fixes

- fix broken release ([b6581a4](https://github.com/Xpdustry/TemplatePlugin/commit/b6581a477826d19cf62dbe632c82d3f3d20edb64))

## [v3.0.1](https://github.com/Xpdustry/TemplatePlugin/compare/v3.0.0...v3.0.1) - 2022-05-21

### Bug Fixes

- Added forgotten line for mindustry compile version ([e03bffc](https://github.com/Xpdustry/TemplatePlugin/commit/e03bffcb936c61fef663954a99eb1a9f696b3315))

## [v3.0.0](https://github.com/Xpdustry/TemplatePlugin/compare/v2.6.1...v3.0.0) - 2022-05-21

### ⚠ BREAKING CHANGES

- Move to toxopid 2.0.0

### Features

- Move to toxopid 2.0.0 ([9208e3c](https://github.com/Xpdustry/TemplatePlugin/commit/9208e3ce21b76437dccd65e510085f13c6540bbb))

### Bug Fixes

- pls release-please, work ([ed558ee](https://github.com/Xpdustry/TemplatePlugin/commit/ed558ee00ed440400be6d1b1bf32cb7af0e5f203))
- remove comment in release-please.yml ([1fb8259](https://github.com/Xpdustry/TemplatePlugin/commit/1fb8259d931111371eb0f1c8f3915e97469456e1))
- updated license header ([fde8c59](https://github.com/Xpdustry/TemplatePlugin/commit/fde8c594acac66768d86cf372cda8ab604b13823))

## [v2.6.1](https://github.com/Xpdustry/TemplatePlugin/compare/v2.6.0...v2.6.1) - 2022-05-19

### Bug Fixes

- Update changelog to follow release-please style ([9fdd102](https://github.com/Xpdustry/TemplatePlugin/commit/9fdd102941d30f3c386d6612d23ed92d3adfd968))

## [v2.6.0](https://github.com/Xpdustry/TemplatePlugin/compare/v2.5.1...v2.6.0) - 2022-05-19

### Features

- Test release please ([3bb5d54](https://github.com/Xpdustry/TemplatePlugin/commit/3bb5d542dc8ba77583a837b2e21b89ea4f94a658))

### Bug Fixes

- fix branch name in release-please ([ba2f978](https://github.com/Xpdustry/TemplatePlugin/commit/ba2f978c33bac4993f316eb58f062f8a18c007fa))

## [v2.5.1](https://github.com/Xpdustry/TemplatePlugin/compare/v2.5.0...v2.5.1) - 2022-05-17

### Added

- Information about shading in the `README.md`.

### Fixed

- Typos in the `README.md`.

## [v2.5.0](https://github.com/Xpdustry/TemplatePlugin/compare/v2.4.0...v2.5.0) - 2022-05-17

### Added

- Added automatic shading task.
- Added `indra.license-header` for license headers in files.

### Changed

- Updated `README.md` to be more explicit.
- A little bit of formatting :^).

## v2.4.0 - 2022-05-14

### Changed

- Improved the usability of the Template.
4 changes: 2 additions & 2 deletions HEADER.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/*
* This file is part of TemplatePlugin. A template plugin for Mindustry to get you started quickly.
* This file is part of SLF4MD. A set of plugins providing various SLF4J implementations for Mindustry.
*
* MIT License
*
* Copyright (c) 2024 Xpdustry
* Copyright (c) 2024 xpdustry
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2024 Xpdustry
Copyright (c) 2024 xpdustry

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
70 changes: 32 additions & 38 deletions README.md
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.
Loading

0 comments on commit 8473a79

Please sign in to comment.