Skip to content

Commit 11b9ec7

Browse files
authored
Initialize xpdustry-master
0 parents  commit 11b9ec7

16 files changed

+985
-0
lines changed

.github/workflows/build.yml

+84
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
branches: [ "**" ]
6+
tags-ignore: [ "**" ]
7+
pull_request:
8+
release:
9+
types: [ released, prereleased ]
10+
11+
concurrency:
12+
group: "${{ github.workflow }}-${{ github.event.number || github.ref }}"
13+
cancel-in-progress: true
14+
15+
jobs:
16+
build:
17+
# Only run on PRs if the source branch is on someone else's repo
18+
if: ${{ github.event_name != 'pull_request' || github.repository != github.event.pull_request.head.repo.full_name }}
19+
20+
runs-on: ubuntu-latest
21+
22+
steps:
23+
- name: Checkout Repository
24+
uses: actions/checkout@v4
25+
26+
- name: Set up JDK 17
27+
uses: actions/setup-java@v4
28+
with:
29+
java-version: 17
30+
distribution: 'temurin'
31+
32+
- name: Setup Gradle
33+
uses: gradle/actions/setup-gradle@v4
34+
35+
- name: Build Artifact
36+
run: ./gradlew release
37+
38+
- name: Upload Artifact to Actions
39+
uses: actions/upload-artifact@v4
40+
with:
41+
name: "${{ github.event.repository.name }}-artifacts"
42+
path: build/tmp/release/*.jar
43+
if-no-files-found: error
44+
45+
- name: Determine Status
46+
run: |
47+
if [ "$(./gradlew properties | awk '/^version:/ { print $2; }' | grep '\-SNAPSHOT')" ]; then
48+
echo "STATUS=snapshot" >> $GITHUB_ENV
49+
else
50+
echo "STATUS=release" >> $GITHUB_ENV
51+
fi
52+
53+
- name: Publish to Xpdustry
54+
if: ${{ env.STATUS == 'release' || startsWith(github.ref, 'refs/heads/master') || startsWith(github.ref, 'refs/heads/dev') }}
55+
run: ./gradlew publish
56+
env:
57+
ORG_GRADLE_PROJECT_xpdustryUsername: "${{ secrets.XPDUSTRY_MAVEN_USERNAME }}"
58+
ORG_GRADLE_PROJECT_xpdustryPassword: "${{ secrets.XPDUSTRY_MAVEN_PASSWORD }}"
59+
ORG_GRADLE_PROJECT_signingKey: "${{ secrets.XPDUSTRY_MAVEN_SIGNING_KEY }}"
60+
ORG_GRADLE_PROJECT_signingPassword: "${{ secrets.XPDUSTRY_MAVEN_SIGNING_PASSWORD }}"
61+
62+
- name: Upload Artifacts to Release
63+
if: ${{ env.STATUS == 'release' && github.event_name == 'release' }}
64+
uses: svenstaro/upload-release-action@v2
65+
with:
66+
repo_token: ${{ secrets.GITHUB_TOKEN }}
67+
file: build/tmp/release/*.jar
68+
file_glob: true
69+
tag: ${{ github.ref }}
70+
71+
- name: Update Changelog
72+
if: ${{ env.STATUS == 'release' && github.event_name == 'release' }}
73+
uses: stefanzweifel/changelog-updater-action@v1
74+
with:
75+
latest-version: ${{ github.event.release.tag_name }}
76+
release-notes: ${{ github.event.release.body }}
77+
78+
- name: Commit Updated Changelog
79+
if: ${{ env.STATUS == 'release' && github.event_name == 'release' }}
80+
uses: stefanzweifel/git-auto-commit-action@v5
81+
with:
82+
branch: ${{ github.event.release.target_commitish }}
83+
commit_message: Update CHANGELOG
84+
file_pattern: CHANGELOG.md

.gitignore

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
## Gradle
2+
.gradle
3+
**/build/
4+
!src/**/build/
5+
!gradle-wrapper.jar
6+
7+
## Eclipse
8+
bin/
9+
.metadata/
10+
.settings/
11+
.classpath
12+
.project
13+
.loadpath
14+
15+
## VSCode
16+
.vscode/*
17+
18+
## Java
19+
*.class
20+
*.jar
21+
*.war
22+
*.rar
23+
*.nar
24+
*.ear
25+
*.zip
26+
*.tar.gz
27+
hs_err_pid*
28+
replay_pid*
29+
30+
## Intellij
31+
.idea/
32+
*.ipr
33+
*.iws
34+
*.iml
35+
36+
## OS Specific
37+
.DS_Store
38+
Thumbs.db

CHANGELOG.md

+149
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,149 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](http://keepachangelog.com/),
6+
and this project adheres to [Semantic Versioning](http://semver.org/).
7+
8+
## v3.5.0 - 2023-11-07
9+
10+
### Changes
11+
12+
- Complete refresh of the template to be up to date.
13+
- Made the README simpler.
14+
- Moved all configuration inside buildscript instead of being split into several files.
15+
16+
## v3.4.0 - 2023-01-07
17+
18+
### Changes
19+
20+
- Better README.
21+
22+
### Chores
23+
24+
- Bump dependencies.
25+
26+
## v3.3.0 - 2022-11-08
27+
28+
### Changes
29+
30+
- Switched the nullness annotations from jetbrains to checker (checker is better).
31+
32+
### Features
33+
34+
- Added option to enable/disable `-SNAPSHOT` suffix.
35+
36+
### Fixes
37+
38+
- Fixes a bug where java 8 is set as the project version.
39+
40+
### Chores
41+
42+
- Bumped workflow tasks.
43+
- Reworked the `README.md` to be simpler.
44+
45+
## v3.2.0 - 2022-10-08
46+
47+
### 💊 Bugfixes
48+
49+
- removed initial sha lookup in release-drafter
50+
51+
### 🧹 Chore
52+
53+
- bump dependencies
54+
- fix ci formatting
55+
- fix doc changelog
56+
57+
## v3.1.0 - 2022-05-23
58+
59+
### 🚀 New Features
60+
61+
- Release drafter is now a manual workflow
62+
63+
## v3.0.4 - 2022-05-23
64+
65+
### Changes
66+
67+
- Got rid of release-please...
68+
69+
### 💊 Bugfixes
70+
71+
- fixed missing status task in build workflow
72+
73+
## [v3.0.3](https://github.com/Xpdustry/TemplatePlugin/compare/v3.0.3-SNAPSHOT...v3.0.3) - 2022-05-22
74+
75+
### Miscellaneous Chores
76+
77+
- release 3.0.3 ([ef49fd2](https://github.com/Xpdustry/TemplatePlugin/commit/ef49fd26dc65b14449a1ca58985e8da2aaa43f62))
78+
79+
## [v3.0.2](https://github.com/Xpdustry/TemplatePlugin/compare/v3.0.1...v3.0.2) - 2022-05-21
80+
81+
### Bug Fixes
82+
83+
- fix broken release ([b6581a4](https://github.com/Xpdustry/TemplatePlugin/commit/b6581a477826d19cf62dbe632c82d3f3d20edb64))
84+
85+
## [v3.0.1](https://github.com/Xpdustry/TemplatePlugin/compare/v3.0.0...v3.0.1) - 2022-05-21
86+
87+
### Bug Fixes
88+
89+
- Added forgotten line for mindustry compile version ([e03bffc](https://github.com/Xpdustry/TemplatePlugin/commit/e03bffcb936c61fef663954a99eb1a9f696b3315))
90+
91+
## [v3.0.0](https://github.com/Xpdustry/TemplatePlugin/compare/v2.6.1...v3.0.0) - 2022-05-21
92+
93+
### ⚠ BREAKING CHANGES
94+
95+
- Move to toxopid 2.0.0
96+
97+
### Features
98+
99+
- Move to toxopid 2.0.0 ([9208e3c](https://github.com/Xpdustry/TemplatePlugin/commit/9208e3ce21b76437dccd65e510085f13c6540bbb))
100+
101+
### Bug Fixes
102+
103+
- pls release-please, work ([ed558ee](https://github.com/Xpdustry/TemplatePlugin/commit/ed558ee00ed440400be6d1b1bf32cb7af0e5f203))
104+
- remove comment in release-please.yml ([1fb8259](https://github.com/Xpdustry/TemplatePlugin/commit/1fb8259d931111371eb0f1c8f3915e97469456e1))
105+
- updated license header ([fde8c59](https://github.com/Xpdustry/TemplatePlugin/commit/fde8c594acac66768d86cf372cda8ab604b13823))
106+
107+
## [v2.6.1](https://github.com/Xpdustry/TemplatePlugin/compare/v2.6.0...v2.6.1) - 2022-05-19
108+
109+
### Bug Fixes
110+
111+
- Update changelog to follow release-please style ([9fdd102](https://github.com/Xpdustry/TemplatePlugin/commit/9fdd102941d30f3c386d6612d23ed92d3adfd968))
112+
113+
## [v2.6.0](https://github.com/Xpdustry/TemplatePlugin/compare/v2.5.1...v2.6.0) - 2022-05-19
114+
115+
### Features
116+
117+
- Test release please ([3bb5d54](https://github.com/Xpdustry/TemplatePlugin/commit/3bb5d542dc8ba77583a837b2e21b89ea4f94a658))
118+
119+
### Bug Fixes
120+
121+
- fix branch name in release-please ([ba2f978](https://github.com/Xpdustry/TemplatePlugin/commit/ba2f978c33bac4993f316eb58f062f8a18c007fa))
122+
123+
## [v2.5.1](https://github.com/Xpdustry/TemplatePlugin/compare/v2.5.0...v2.5.1) - 2022-05-17
124+
125+
### Added
126+
127+
- Information about shading in the `README.md`.
128+
129+
### Fixed
130+
131+
- Typos in the `README.md`.
132+
133+
## [v2.5.0](https://github.com/Xpdustry/TemplatePlugin/compare/v2.4.0...v2.5.0) - 2022-05-17
134+
135+
### Added
136+
137+
- Added automatic shading task.
138+
- Added `indra.license-header` for license headers in files.
139+
140+
### Changed
141+
142+
- Updated `README.md` to be more explicit.
143+
- A little bit of formatting :^).
144+
145+
## v2.4.0 - 2022-05-14
146+
147+
### Changed
148+
149+
- Improved the usability of the Template.

HEADER.txt

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/*
2+
* This file is part of TemplatePlugin. A template plugin for Mindustry to get you started quickly.
3+
*
4+
* MIT License
5+
*
6+
* Copyright (c) 2024 Xpdustry
7+
*
8+
* Permission is hereby granted, free of charge, to any person obtaining a copy
9+
* of this software and associated documentation files (the "Software"), to deal
10+
* in the Software without restriction, including without limitation the rights
11+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12+
* copies of the Software, and to permit persons to whom the Software is
13+
* furnished to do so, subject to the following conditions:
14+
*
15+
* The above copyright notice and this permission notice shall be included in all
16+
* copies or substantial portions of the Software.
17+
*
18+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24+
* SOFTWARE.
25+
*/

LICENSE.md

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2024 Xpdustry
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

+61
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# template-plugin
2+
3+
[![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)
4+
[![Mindustry 7.0](https://img.shields.io/badge/Mindustry-7.0-ffd37f)](https://github.com/Anuken/Mindustry/releases)
5+
6+
Get your Mindustry plugin started with this awesome template repository, it features:
7+
8+
- GitHub actions for easier testing (the plugin is built for each commit and pull request).
9+
10+
- [Toxopid](https://plugins.gradle.org/plugin/com.xpdustry.toxopid) Gradle plugin for faster Mindustry plugin
11+
development and testing.
12+
13+
- [Indra](https://plugins.gradle.org/plugin/net.kyori.indra) Gradle plugin for easier java development.
14+
15+
- Bundling and automatic relocation with the [Shadow](https://gradleup.com/shadow/) gradle plugin.
16+
17+
- Unused classes are removed from the final jar.
18+
19+
- A `CHANGELOG.md` file that will be updated automatically when you create a release on GitHub.
20+
21+
## How to use
22+
23+
1. Update the `build.gradle.kts`, `settings.gradle.kts` and `plugin.json` files with your plugin data.
24+
25+
2. Clear `CHANGELOG.md` and update `LICENSE.md` with your name (or completely changing the license if needed)
26+
27+
3. Start **K O D I N G**.
28+
29+
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.
30+
31+
## Installation
32+
33+
This plugin requires :
34+
35+
- Java 17 or above.
36+
37+
- Mindustry v146 or above.
38+
39+
## Building
40+
41+
- `./gradlew shadowJar` to compile the plugin into a usable jar (will be located
42+
at `builds/libs/(plugin-name).jar`).
43+
44+
- `./gradlew runMindustryServer` to run the plugin in a local Mindustry server.
45+
46+
- `./gradlew runMindustryDesktop` to start a local Mindustry client that will let you test the plugin.
47+
48+
## Note
49+
50+
If you are from Xpdustry, before doing anything, run this in your terminal to set the `xpdustry-master` branch as master :
51+
52+
```bash
53+
git fetch origin xpdustry-master
54+
git checkout xpdustry-master
55+
git branch -m master old-master
56+
git branch -m xpdustry-master master
57+
git branch -rD origin/master
58+
git push origin master -f
59+
git branch -D old-master
60+
git push origin --delete xpdustry-master
61+
```

0 commit comments

Comments
 (0)