Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • Griefed/ServerPackCreatorExampleAddon
1 result
Show changes
Commits on Source (22)
......@@ -31,7 +31,7 @@ jobs:
# DEPLOY TO GH-PAGES
- name: Deploy to GitHub-Pages
uses: JamesIves/github-pages-deploy-action@v4.2.2
uses: JamesIves/github-pages-deploy-action@v4.2.3
with:
branch: gh-pages
folder: build/docs/javadoc
......@@ -6,8 +6,13 @@ on:
- '*'
jobs:
release:
runs-on: ubuntu-latest
# OUTPUTS
outputs:
newtag: ${{ steps.tag.outputs.tag }}
uploadurl: ${{ steps.create_release.outputs.upload_url }}
steps:
# GET LATEST CODE
- name: Checkout latest code
......@@ -27,6 +32,7 @@ jobs:
uses: ardalanamini/auto-changelog@master
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Create Release
id: create_release
uses: actions/create-release@latest
......@@ -42,26 +48,103 @@ jobs:
draft: false
prerelease: false
main:
needs: release
runs-on: ubuntu-latest
steps:
# GET LATEST CODE
- name: Checkout latest code
uses: actions/checkout@master
with:
ref: main
fetch-depth: 0
# BUILD PROJECT AND PUBLISH TO PACKAGES
- name: Set up JDK 8
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: '8'
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Publish to GitHub Packages
env:
GITHUB_ACTOR: ${{ secrets.GITHUB_ACTOR }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
NEW_VERSION=$(echo "${{ needs.release.outputs.newtag }}")
echo "New version: ${NEW_VERSION}"
echo "Github username: ${GITHUB_ACTOR}"
./gradlew about
./gradlew -Pversion=${NEW_VERSION} build --info -x test
# UPLOAD ASSETS TO RELEASE
- name: Upload Release Asset Main Jar
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.release.outputs.uploadurl }}
asset_path: ./build/libs/ExampleAddon-${{ needs.release.outputs.newtag }}.jar
asset_name: ExampleAddon-${{ needs.release.outputs.newtag }}.jar
asset_content_type: application/jar
- name: Upload Release Asset Sources Jar
id: upload-release-asset-sources
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.release.outputs.uploadurl }}
asset_path: ./build/libs/ExampleAddon-${{ needs.release.outputs.newtag }}-sources.jar
asset_name: ExampleAddon-${{ needs.release.outputs.newtag }}-sources.jar
asset_content_type: application/jar
- name: Upload Release Asset Javadoc Jar
id: upload-release-asset-javadoc
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.release.outputs.uploadurl }}
asset_path: ./build/libs/ExampleAddon-${{ needs.release.outputs.newtag }}-javadoc.jar
asset_name: ExampleAddon-${{ needs.release.outputs.newtag }}-javadoc.jar
asset_content_type: application/jar
alternative:
needs: release
runs-on: ubuntu-latest
steps:
# GET LATEST CODE
- name: Checkout latest code
uses: actions/checkout@master
with:
ref: alternativeExtensionDeclaration
fetch-depth: 0
# BUILD PROJECT AND PUBLISH TO PACKAGES
- name: Set up JDK 8
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: '8'
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Publish to GitHub Packages
env:
GITHUB_ACTOR: ${{ secrets.GITHUB_ACTOR }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
NEW_VERSION=$(echo "${{steps.tag.outputs.tag}}")
NEW_VERSION=$(echo "${{ needs.release.outputs.newtag }}")
echo "New version: ${NEW_VERSION}"
echo "Github username: ${GITHUB_ACTOR}"
./gradlew about
./gradlew -Pversion=${NEW_VERSION} publish --info -x test
- name: List files
run: ls -ahl build/libs
./gradlew -Pversion=${NEW_VERSION} build --info -x test
# UPLOAD ASSETS TO RELEASE
- name: Upload Release Asset Main Jar
......@@ -70,27 +153,95 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./build/libs/serverpackcreatorexampleaddon-${{steps.tag.outputs.tag}}.jar
asset_name: serverpackcreatorexampleaddon-${{steps.tag.outputs.tag}}.jar
upload_url: ${{ needs.release.outputs.uploadurl }}
asset_path: ./build/libs/AlternativeExtensionDeclaration-${{ needs.release.outputs.newtag }}.jar
asset_name: AlternativeExtensionDeclaration-${{ needs.release.outputs.newtag }}.jar
asset_content_type: application/jar
- name: Upload Release Asset Sources Jar
id: upload-release-asset-sources
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./build/libs/serverpackcreatorexampleaddon-${{steps.tag.outputs.tag}}-sources.jar
asset_name: serverpackcreatorexampleaddon-${{steps.tag.outputs.tag}}-sources.jar
upload_url: ${{ needs.release.outputs.uploadurl }}
asset_path: ./build/libs/AlternativeExtensionDeclaration-${{ needs.release.outputs.newtag }}-sources.jar
asset_name: AlternativeExtensionDeclaration-${{ needs.release.outputs.newtag }}-sources.jar
asset_content_type: application/jar
- name: Upload Release Asset Javadoc Jar
id: upload-release-asset-javadoc
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.release.outputs.uploadurl }}
asset_path: ./build/libs/AlternativeExtensionDeclaration-${{ needs.release.outputs.newtag }}-javadoc.jar
asset_name: AlternativeExtensionDeclaration-${{ needs.release.outputs.newtag }}-javadoc.jar
asset_content_type: application/jar
tetris:
needs: release
runs-on: ubuntu-latest
steps:
# GET LATEST CODE
- name: Checkout latest code
uses: actions/checkout@master
with:
ref: tetris
fetch-depth: 0
# BUILD PROJECT AND PUBLISH TO PACKAGES
- name: Set up JDK 8
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: '8'
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Publish to GitHub Packages
env:
GITHUB_ACTOR: ${{ secrets.GITHUB_ACTOR }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
NEW_VERSION=$(echo "${{ needs.release.outputs.newtag }}")
echo "New version: ${NEW_VERSION}"
echo "Github username: ${GITHUB_ACTOR}"
./gradlew about
./gradlew -Pversion=${NEW_VERSION} build --info -x test
# UPLOAD ASSETS TO RELEASE
- name: Upload Release Asset Main Jar
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.release.outputs.uploadurl }}
asset_path: ./build/libs/Minigame-${{ needs.release.outputs.newtag }}.jar
asset_name: Minigame-${{ needs.release.outputs.newtag }}.jar
asset_content_type: application/jar
- name: Upload Release Asset Sources Jar
id: upload-release-asset-sources
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.release.outputs.uploadurl }}
asset_path: ./build/libs/Minigame-${{ needs.release.outputs.newtag }}-sources.jar
asset_name: Minigame-${{ needs.release.outputs.newtag }}-sources.jar
asset_content_type: application/jar
- name: Upload Release Asset Javadoc Jar
id: upload-release-asset-javadoc
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./build/libs/serverpackcreatorexampleaddon-${{steps.tag.outputs.tag}}-javadoc.jar
asset_name: serverpackcreatorexampleaddon-${{steps.tag.outputs.tag}}-javadoc.jar
upload_url: ${{ needs.release.outputs.uploadurl }}
asset_path: ./build/libs/Minigame-${{ needs.release.outputs.newtag }}-javadoc.jar
asset_name: Minigame-${{ needs.release.outputs.newtag }}-javadoc.jar
asset_content_type: application/jar
\ No newline at end of file
......@@ -6,10 +6,80 @@ on:
workflow_dispatch:
jobs:
test:
main:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: main
- name: Set up JDK 8
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: '8'
- name: Where is Java
run: which java
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew about build --no-daemon --info
- name: List files in libs
run: ls -ahl build/libs
- uses: actions/upload-artifact@v2
with:
name: build-artifacts-gradle
path: |
build/libs/
!build/libs/libraries/
frontend/dist/spa
if-no-files-found: warn # 'warn' or 'ignore' are also available, defaults to `warn`
- uses: actions/upload-artifact@v2
if: failure()
with:
name: report
path: build/reports/tests/test/
if-no-files-found: warn # 'warn' or 'ignore' are also available, defaults to `warn`
alternative:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: alternativeExtensionDeclaration
- name: Set up JDK 8
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: '8'
- name: Where is Java
run: which java
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew about build --no-daemon --info
- name: List files in libs
run: ls -ahl build/libs
- uses: actions/upload-artifact@v2
with:
name: build-artifacts-gradle
path: |
build/libs/
!build/libs/libraries/
frontend/dist/spa
if-no-files-found: warn # 'warn' or 'ignore' are also available, defaults to `warn`
- uses: actions/upload-artifact@v2
if: failure()
with:
name: report
path: build/reports/tests/test/
if-no-files-found: warn # 'warn' or 'ignore' are also available, defaults to `warn`
tetris:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: tetris
- name: Set up JDK 8
uses: actions/setup-java@v2
with:
......
......@@ -5,10 +5,10 @@ stages:
- Build Release
Gradle Test:
image: griefed/baseimage-ubuntu-jdk-8:2.0.2
image: griefed/baseimage-ubuntu-jdk-8:2.0.4
stage: Gradle Test
services:
- name: griefed/gitlab-ci-cd:2.0.0
- name: griefed/gitlab-ci-cd:2.0.1
alias: docker
variables:
project_name: $CI_PROJECT_NAME
......@@ -26,28 +26,6 @@ Gradle Test:
script:
- echo "**** Building ServerPackCreator ****"
- ./gradlew build --info
- echo "**** Listing build directory ****"
- LC_COLLATE=C ls -ahl --group-directories-first --color=auto
build
- LC_COLLATE=C ls -ahl --group-directories-first --color=auto
build/libs
- echo "**** Renaming files to please the eye ****"
- mv
build/libs/serverpackcreatorexampleaddon.jar
build/libs/ServerPackCreatorExampleAddon.jar
- mv
build/libs/serverpackcreatorexampleaddon-javadoc.jar
build/libs/ServerPackCreatorExampleAddon-javadoc.jar
- mv
build/libs/serverpackcreatorexampleaddon-sources.jar
build/libs/ServerPackCreatorExampleAddon-sources.jar
artifacts:
paths:
- build/libs/ServerPackCreatorExampleAddon.jar
- build/libs/ServerPackCreatorExampleAddon-javadoc.jar
- build/libs/ServerPackCreatorExampleAddon-sources.jar
- build/reports/tests/test
expire_in: 1 week
except:
refs:
- tags
......@@ -60,9 +38,9 @@ Release:
- job: 'Gradle Test'
artifacts: false
stage: Release
image: griefed/gitlab-ci-cd:2.0.0
image: griefed/gitlab-ci-cd:2.0.1
services:
- name: griefed/gitlab-ci-cd:2.0.0
- name: griefed/gitlab-ci-cd:2.0.1
alias: docker
variables:
project_name: $CI_PROJECT_NAME
......@@ -70,7 +48,6 @@ Release:
script:
- npx semantic-release
only:
- master
- main
except:
refs:
......@@ -78,91 +55,11 @@ Release:
variables:
- $CI_COMMIT_TITLE =~ /^RELEASE:.+$/
Build Release:
image: griefed/baseimage-ubuntu-jdk-8:2.0.2
stage: Build Release
services:
- name: griefed/gitlab-ci-cd:2.0.0
alias: docker
variables:
project_name: $CI_PROJECT_NAME
SEMANTIC_RELEASE_PACKAGE: $CI_PROJECT_NAME
before_script:
- echo "**** Running in $CI_JOB_ID ****"
- echo "**** Java location ****"
- which java
- echo "**** Java version ****"
- java -version
- echo "**** Allowing execution of gradlew ****"
- chmod +x gradlew
- echo "**** Ensure clean environment ****"
- ./gradlew about
script:
- echo "**** Building ServerPackCreator ****"
- ./gradlew build --info -x test
- echo "**** Listing build directory ****"
- LC_COLLATE=C ls -ahl --group-directories-first --color=auto
build
- LC_COLLATE=C ls -ahl --group-directories-first --color=auto
build/libs
- echo "**** Renaming files to please the eye ****"
- mv
build/libs/serverpackcreatorexampleaddon.jar
build/libs/${CI_PROJECT_NAME}-${CI_COMMIT_TAG}.jar
- mv
build/libs/serverpackcreatorexampleaddon-javadoc.jar
build/libs/${CI_PROJECT_NAME}-${CI_COMMIT_TAG}-javadoc.jar
- mv
build/libs/serverpackcreatorexampleaddon-sources.jar
build/libs/${CI_PROJECT_NAME}-${CI_COMMIT_TAG}-sources.jar
- LC_COLLATE=C ls -ahl --group-directories-first --color=auto
build/libs
- echo "**** Uploading packages ****"
- 'curl
--header "JOB-TOKEN: ${CI_JOB_TOKEN}"
--upload-file build/libs/${CI_PROJECT_NAME}-${CI_COMMIT_TAG}.jar
"${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/${CI_PROJECT_NAME}/${CI_COMMIT_TAG}/${CI_PROJECT_NAME}-${CI_COMMIT_TAG}.jar"'
- 'curl
--header "JOB-TOKEN: ${CI_JOB_TOKEN}"
--upload-file build/libs/${CI_PROJECT_NAME}-${CI_COMMIT_TAG}-javadoc.jar
"${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/${CI_PROJECT_NAME}/${CI_COMMIT_TAG}/${CI_PROJECT_NAME}-${CI_COMMIT_TAG}-javadoc.jar"'
- 'curl
--header "JOB-TOKEN: ${CI_JOB_TOKEN}"
--upload-file build/libs/${CI_PROJECT_NAME}-${CI_COMMIT_TAG}-sources.jar
"${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/${CI_PROJECT_NAME}/${CI_COMMIT_TAG}/${CI_PROJECT_NAME}-${CI_COMMIT_TAG}-sources.jar"'
- echo "**** Create asset links ****"
- 'curl
--request POST
--header "PRIVATE-TOKEN: ${GITLAB_TOKEN}"
--data tag_name="${CI_COMMIT_TAG}"
--data name="${CI_PROJECT_NAME}-${CI_COMMIT_TAG}.jar"
--data url="${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/${CI_PROJECT_NAME}/${CI_COMMIT_TAG}/${CI_PROJECT_NAME}-${CI_COMMIT_TAG}.jar"
--data link_type="package"
"${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/releases/${CI_COMMIT_TAG}/assets/links"'
- 'curl
--request POST
--header "PRIVATE-TOKEN: ${GITLAB_TOKEN}"
--data tag_name="${CI_COMMIT_TAG}"
--data name="${CI_PROJECT_NAME}-${CI_COMMIT_TAG}-javadoc.jar"
--data url="${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/${CI_PROJECT_NAME}/${CI_COMMIT_TAG}/${CI_PROJECT_NAME}-${CI_COMMIT_TAG}-javadoc.jar"
--data link_type="package"
"${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/releases/${CI_COMMIT_TAG}/assets/links"'
- 'curl
--request POST
--header "PRIVATE-TOKEN: ${GITLAB_TOKEN}"
--data tag_name="${CI_COMMIT_TAG}"
--data name="${CI_PROJECT_NAME}-${CI_COMMIT_TAG}-sources.jar"
--data url="${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/${CI_PROJECT_NAME}/${CI_COMMIT_TAG}/${CI_PROJECT_NAME}-${CI_COMMIT_TAG}-sources.jar"
--data link_type="package"
"${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/releases/${CI_COMMIT_TAG}/assets/links"'
only:
- tags
pages:
image: griefed/baseimage-ubuntu-jdk-8:2.0.2
image: griefed/baseimage-ubuntu-jdk-8:2.0.4
stage: Documentation
services:
- name: griefed/gitlab-ci-cd:2.0.0
- name: griefed/gitlab-ci-cd:2.0.1
alias: docker
variables:
project_name: $CI_PROJECT_NAME
......@@ -182,4 +79,4 @@ pages:
artifacts:
paths:
- public
expire_in: 1 week
expire_in: 1 week
\ No newline at end of file
### [3.0.3](https://git.griefed.de/Griefed/ServerPackCreatorExampleAddon/compare/3.0.2...3.0.3) (2022-02-15)
### 🦊 CI/CD
* **deps:** Bump ServerPackCreator to 3.0.0-beta.1 ([9d2ea8f](https://git.griefed.de/Griefed/ServerPackCreatorExampleAddon/commit/9d2ea8f4b36675e2cd6de16dd71c15a63c057048))
* **branches:** Add different branches to releases and tests, so people can download the different examples and use them. ([43ac00d](https://git.griefed.de/Griefed/ServerPackCreatorExampleAddon/commit/43ac00df930107f578817a4fb5f84a9e62ea0868))
* **release:** Don't build release assets on GitLab. Don't upload artifacts from test job. ([016d69c](https://git.griefed.de/Griefed/ServerPackCreatorExampleAddon/commit/016d69c0abcd1b237751787f2815c1465d6e5948))
* **release:** On tag, build all three branches and upload assets to generated release. ([f15205a](https://git.griefed.de/Griefed/ServerPackCreatorExampleAddon/commit/f15205aa3c9f5df1ca2643a553b93e001376e6b4))
### Other
* Add info about additional example in alternativeExtensionDeclaration branch ([acbf95e](https://git.griefed.de/Griefed/ServerPackCreatorExampleAddon/commit/acbf95ef4a8cbc9514fb4fd281a5c906ef5ad4ce))
* **deps:** update dependency gradle to v7.4 ([f87176b](https://git.griefed.de/Griefed/ServerPackCreatorExampleAddon/commit/f87176bf16db596c803f152443e49191a2bc8fd5))
* **deps:** update griefed/baseimage-ubuntu-jdk-8 docker tag to v2.0.3 ([0a41972](https://git.griefed.de/Griefed/ServerPackCreatorExampleAddon/commit/0a419721a720e47ac83729f6ead8d7532bbbe5c3))
* **deps:** update griefed/baseimage-ubuntu-jdk-8 docker tag to v2.0.4 ([b102243](https://git.griefed.de/Griefed/ServerPackCreatorExampleAddon/commit/b1022430720088830a696ecb70a7347d80f33b21))
* **deps:** update griefed/gitlab-ci-cd docker tag to v2.0.1 ([f6096fe](https://git.griefed.de/Griefed/ServerPackCreatorExampleAddon/commit/f6096fea21b140465432dbe87c5e4d8380ad849d))
* **deps:** update jamesives/github-pages-deploy-action action to v4.2.3 ([7e220fd](https://git.griefed.de/Griefed/ServerPackCreatorExampleAddon/commit/7e220fde79c2833a191d41cf314bd604de215b4a))
* **README:** Rephrase addons section and include link to new addons overview website ([31b291a](https://git.griefed.de/Griefed/ServerPackCreatorExampleAddon/commit/31b291aceab2f40393b418259c87050cdaee1cb9))
### [3.0.2](https://git.griefed.de/Griefed/ServerPackCreatorExampleAddon/compare/3.0.1...3.0.2) (2022-01-31)
......
......@@ -80,32 +80,52 @@ Additionally, the following files/directories would be created in the server pac
![tab](img/exampleTab.png)
# 1. The reason for allowing ServerPackCreator to run addons:
# 1. Addons
Some people need additional functionality for their server packs, or have some additional wishes for them. Some of those
things may not fit into the core functionality of ServerPackCreator itself.
## 1.1 Why
There are things which people want to do with their server packs which could most certainly be automated. Some of those
things so special, or maybe out of place, that they would not warrant a separate feature for ServerPackCreator itself.
It may also be that it is such a niche feature, that I either don't have the time to code it in, or simply don't want to.
Maybe it doesn't fit into the overall design of ServerPackCreator, too. Who knows, it could be any of those reasons or another.
**Hence, the addon functionality.**
**Hence, the addon functionality!**
This allows people to write their own addons to expand the functionality of ServerPackCreator with their own features as
they see fit or want.
Some examples for addons can be found [in this discussion thread](https://github.com/Griefed/ServerPackCreator/discussions/201).
For documentation about Pf4j, visit the [Pf4j documentation](https://pf4j.org/)
## 1.2 Adding your own
How to get your own addon into this list:
If you have written your own addon or plugin for ServerPackCreator and you would like to see it added here, please open an issue over at ServerPackCreatoron GitHub, using the Documentation template.
For an addon to be accepted, you must at least provide:
- The name of the repository, and therefore the addon.
- The owner of the repository, and therefore the addon.
- The branch of the repository where the main code resides in.
- A description of the plugin or addon.
A curated list of officially acknowledged addons/plugins can be found at [addons.griefed.de](https://addons.griefed.de) (redirects to [GitHub Pages](https://griefed.github.io/ServerPackCreator-Addons-Overview/#/))
## 1.3 Examples for potential addons
Some examples for potential addons can be found [in this discussion thread](https://github.com/Griefed/ServerPackCreator/discussions/201).
Some excerpts:
1. Changelog generator, by @TheButterbrotMan at [Feature request]: Changelog generator #198
- A changelog generator that checks the differences to the previous version and generates a changelog.
- A changelog generator that checks the differences to the previous version and generates a changelog.
2. Bundle Adoptium Java with server packs, by @kreezxil at [Feature request]: Bundle Adoptium Java #199
- Because modpacks need one of the either Java 8, 16, or 17, it would be nice to have the corresponding https://adoptium.net java prebundled with the server pack.
- Because modpacks need one of the either Java 8, 16, or 17, it would be nice to have the corresponding https://adoptium.net java prebundled with the server pack.
3. Automatic setup of a server pack for [BlueMap](https://www.curseforge.com/minecraft/mc-mods/bluemap)
- Check all mods in the specified modpacks mods-directory for textures, and if any are found, add the mod to
BlueMap's resourcepack folder `config/bluemap/resourcepacks`, install BlueMap for the specified Minecraft and Forge/Fabric
version and voilà!
- Check all mods in the specified modpacks mods-directory for textures, and if any are found, add the mod to
BlueMap's resourcepack folder `config/bluemap/resourcepacks`, install BlueMap for the specified Minecraft and Forge/Fabric
version and voilà!
# 2. How
......@@ -148,7 +168,8 @@ along with a small description, if you provided one.
Example:
| Addon | Creator | Description |
|:-----------------------------------------------------------------------------------------|:--------|:-------------------------------------------------------------------|
| [ExampleAddon](https://github.com/Griefed/ServerPackCreatorExampleAddon) | Griefed | An example addon providing a starting point for addon development. |
| [Example MiniGame](https://github.com/Griefed/ServerPackCreatorExampleAddon/tree/tetris) | Griefed | Play Tetris in a new window whilst your server packs generate! |
\ No newline at end of file
| Addon | Creator | Description |
|:------------------------------------------------------------------------------------------------------------------------------------------------|:--------|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [ExampleAddon](https://github.com/Griefed/ServerPackCreatorExampleAddon) | Griefed | An example addon providing a starting point for addon development. |
| [ExampleAddon Alternative Extension Declaration](https://github.com/Griefed/ServerPackCreatorExampleAddon/tree/alternativeExtensionDeclaration) | Griefed | An example addon providing a starting point for addon development. This addon provides an example for a different way of declaring extensions as well as reading entries from the plugins manifest. |
| [Example MiniGame](https://github.com/Griefed/ServerPackCreatorExampleAddon/tree/tetris) | Griefed | Play Tetris in a new window whilst your server packs generate! |
......@@ -5,7 +5,7 @@ plugins {
id 'idea'
}
group 'de.griefed.serverpackcreatorexampleaddon'
group 'de.griefed'
//noinspection GroovyUnusedAssignment
sourceCompatibility = targetCompatibility = '1.8'
......@@ -35,10 +35,6 @@ sourceSets {
repositories {
mavenCentral()
maven { url "https://jitpack.io" }
maven { url 'https://repo.spring.io/release' }
/* If using GitLab.com fails, use git.griefed.de for package retrieval */ //maven { url 'https://git.griefed.de/api/v4/projects/63/packages/maven' }
maven { url 'https://gitlab.com/api/v4/projects/32677538/packages/maven' }
}
configurations {
......@@ -47,19 +43,17 @@ configurations {
}
dependencies {
// Dependencies required for any plugin and/or extension to work
implementation 'org.pf4j:pf4j:3.6.0'
annotationProcessor 'org.pf4j:pf4j:3.6.0'
implementation 'de.griefed:serverpackcreator:3.0.0-beta.2'
embed 'commons-io:commons-io:2.11.0'
embed 'org.apache.commons:commons-lang3:3.12.0'
// Required if you want to log to any of ServerPackCreators logs
implementation 'org.apache.logging.log4j:log4j-api:2.17.1'
/*
* You may need to refresh this dependency every now and then
* Check https://gitlab.com/Griefed/ServerPackCreator/-/packages/4830254 occasionally
*/
implementation 'de.griefed.serverpackcreator:serverpackcreator:3.0.0-alpha.19'
// Dependencies your plugin or extension requires and need to be shipped within the plugin#s JAR-file
embed 'commons-io:commons-io:2.11.0'
embed 'org.apache.commons:commons-lang3:3.12.0'
// Testing
testImplementation 'org.mockito:mockito-core:4.3.1'
......
No preview for this file type
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
rootProject.name = 'serverpackcreatorexampleaddon'
rootProject.name = 'ExampleAddon'
......@@ -107,7 +107,7 @@ public class ExamplePlugin extends Plugin {
LOG_ADDONS.info("Error occurred creating parent directories.", ex);
}
new ConfigUtilities(null,null,null,applicationProperties, null)
new ConfigUtilities(null,null,null,applicationProperties, null, null)
.writeConfigToFile(configurationModel, new File(destination + "/serverpackcreator.conf"));
/*
Write all your post-gen-pre-zip stuff here...
......
......@@ -72,38 +72,70 @@ Additionally, the following files/directories would be created in the server pac
- `serverpackcreator.conf` as it was used to generate the server pack
- `./some/folder/with/a/name`
# 1. The reason for allowing ServerPackCreator to run addons:
| Example at boot time | Example after generation finished |
|----------------------------|-----------------------------------|
| ![boot](img/boot.png) | ![preGen](img/afterGen.png) |
Some people need additional functionality for their server packs, or have some additional wishes for them. Some of those
things may not fit into the core functionality of ServerPackCreator itself.
**Example tab**
![tab](img/exampleTab.png)
# 1. Addons
## 1.1 Why
There are things which people want to do with their server packs which could most certainly be automated. Some of those
things so special, or maybe out of place, that they would not warrant a separate feature for ServerPackCreator itself.
It may also be that it is such a niche feature, that I either don't have the time to code it in, or simply don't want to.
Maybe it doesn't fit into the overall design of ServerPackCreator, too. Who knows, it could be any of those reasons or another.
**Hence, the addon functionality.**
**Hence, the addon functionality!**
This allows people to write their own addons to expand the functionality of ServerPackCreator with their own features as
they see fit or want.
Some examples for addons can be found [in this discussion thread](https://github.com/Griefed/ServerPackCreator/discussions/201).
For documentation about Pf4j, visit the [Pf4j documentation](https://pf4j.org/)
## 1.2 Adding your own
How to get your own addon into this list:
If you have written your own addon or plugin for ServerPackCreator and you would like to see it added here, please open an issue over at ServerPackCreatoron GitHub, using the Documentation template.
For an addon to be accepted, you must at least provide:
- The name of the repository, and therefore the addon.
- The owner of the repository, and therefore the addon.
- The branch of the repository where the main code resides in.
- A description of the plugin or addon.
A curated list of officially acknowledged addons/plugins can be found at [addons.griefed.de](https://addons.griefed.de) (redirects to [GitHub Pages](https://griefed.github.io/ServerPackCreator-Addons-Overview/#/))
## 1.3 Examples for potential addons
Some examples for potential addons can be found [in this discussion thread](https://github.com/Griefed/ServerPackCreator/discussions/201).
Some excerpts:
1. Changelog generator, by @TheButterbrotMan at [Feature request]: Changelog generator #198
- A changelog generator that checks the differences to the previous version and generates a changelog.
- A changelog generator that checks the differences to the previous version and generates a changelog.
2. Bundle Adoptium Java with server packs, by @kreezxil at [Feature request]: Bundle Adoptium Java #199
- Because modpacks need one of the either Java 8, 16, or 17, it would be nice to have the corresponding https://adoptium.net java prebundled with the server pack.
- Because modpacks need one of the either Java 8, 16, or 17, it would be nice to have the corresponding https://adoptium.net java prebundled with the server pack.
3. Automatic setup of a server pack for [BlueMap](https://www.curseforge.com/minecraft/mc-mods/bluemap)
- Check all mods in the specified modpacks mods-directory for textures, and if any are found, add the mod to
BlueMap's resourcepack folder `config/bluemap/resourcepacks`, install BlueMap for the specified Minecraft and Forge/Fabric
version and voilà!
- Check all mods in the specified modpacks mods-directory for textures, and if any are found, add the mod to
BlueMap's resourcepack folder `config/bluemap/resourcepacks`, install BlueMap for the specified Minecraft and Forge/Fabric
version and voilà!
# 2. How
During the start of ServerPackCreator, all plugins are loaded and started. If you have anything you need to run then and there,
use `public void start() {...}` and do your thing.
For documentation about Pf4j, visit https://pf4j.org/
If you have ideas and/or suggestions for improvements to the addon-system in ServerPackCreator, open an improvement-issue over at the ServerPackCreator [issues page](https://github.com/Griefed/ServerPackCreator/issues/new?assignees=Griefed&labels=enhancement&template=improvement.yml&title=%5BImprovement+request%5D%3A+)
## 2.1 Extensions
One plugin can have multiple extensions.
......@@ -136,6 +168,8 @@ along with a small description, if you provided one.
Example:
| Addon | Creator | Description |
|:-------------------------------------------------------------------------|:--------|:-------------------------------------------------------------------|
| [ExampleAddon](https://github.com/Griefed/ServerPackCreatorExampleAddon) | Griefed | An example addon providing a starting point for addon development. |
\ No newline at end of file
| Addon | Creator | Description |
|:------------------------------------------------------------------------------------------------------------------------------------------------|:--------|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [ExampleAddon](https://github.com/Griefed/ServerPackCreatorExampleAddon) | Griefed | An example addon providing a starting point for addon development. |
| [ExampleAddon Alternative Extension Declaration](https://github.com/Griefed/ServerPackCreatorExampleAddon/tree/alternativeExtensionDeclaration) | Griefed | An example addon providing a starting point for addon development. This addon provides an example for a different way of declaring extensions as well as reading entries from the plugins manifest. |
| [Example MiniGame](https://github.com/Griefed/ServerPackCreatorExampleAddon/tree/tetris) | Griefed | Play Tetris in a new window whilst your server packs generate! |