Skip to content

Commit ad0ab0b

Browse files
authored
fix: v0.13.0-SNAPSHOT (#187)
* Separate publish and release workflow from gradle workflow. * Switch to `ncipollo/release-action@v1` for creating releases in publish workflow. * Update README.md with more information on platforms. * Reformat README.md. * annotations: Remove `Plugin.Platform`. * annotations: Rename `@PlatformDependeny` to `@Dependency`. * annotations: Fix bugs in generated main classes * Rewrite some Javadoc to make it easier to read. * Replace `PluginData` with `ChameleonPluginData` which has builders. * Rename plural packages to singular for consistency (users -> user, logging -> logger, etc.). * Add Preconditions to aid in checking states and validating arguments. * Rewrite Adventure mappers and audience reflection to adapt to Adventure changes and remove static use to avoid problems. (resolves #186) * Use `Collection` instead of `List` or `Set` in return types. * Add `EventSubscriber.Builder#filters(Collection)`. * Create `ServerEvent`. * Create `ConsoleUser`to represent platform consoles. * Add `Platform.<type>` constants, e.g. `Platform.BUKKIT -> "Bukkit"`. * Make PlatformTarget extend Predicate and a functional interface. * Add `PlatformTarget.<type>()` methods to match platforms by id, e.g. `PlatformTarget.bukkit()`. * Rename `ProxyUser#getServer()` to `ProxyUser#getConnectedServer()` for clarity. * Remove `User#chat(String)` and `User#chat(Component)` due to changes in Minecraft 1.19.1+. * Make `User` implement `net.kyori.adventure.identity.Identified`. * Rename `UserManager#getPlayers()` to `UserManager#getUsers()` for consistency. * Rename `UserManager#getPlayer(UUID)` to `UserManager#getUserById(UUID)` for consistency. * Add tests with 100% coverage for all Adventure mappers. * Add tests with 87% coverage for all Adventure audience reflection classes. * Improve format of `libs.versions.toml`. * Update adventure-platform to v4.2.0. * Update velocity-api to v3.3.1. * Update minestom to git:f291437ada. * Update annotations to v24.0.0. * Update errorprone to v2.18.0. * Update junit to v5.9.2. * Update nullaway to v0.10.8. * Improve nullaway configuration. * Add Codecov configuration and uploader. * Improve example project a little bit. * General reformatting and other improvements. * Bump version to `0.13.0-SNAPSHOT`.
1 parent fc4a37d commit ad0ab0b

File tree

274 files changed

+10337
-4952
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

274 files changed

+10337
-4952
lines changed

.github/release.yml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
changelog:
2+
exclude:
3+
categories:
4+
- title: "Breaking changes :warning:"
5+
labels:
6+
- "status: breaking"
7+
- title: "Additions :sparkles:"
8+
labels:
9+
- "type: feature"
10+
- "type: enhancement"
11+
- title: "Bug fixes :bug:"
12+
labels:
13+
- "type: bug: fix"
14+
- title: "Improvements :wrench:"
15+
labels:
16+
- "type: refactor"
17+
- title: "Documentation :book:"
18+
labels:
19+
- "type: documentation"
20+
- title: "Test coverage :test_tube:"
21+
labels:
22+
- "type: test"
23+
- title: "Dependency updates"
24+
labels:
25+
- "type: dependencies"
26+
- title: "Other"
27+
labels:
28+
- "*"

.github/workflows/gradle.yml

+5-44
Original file line numberDiff line numberDiff line change
@@ -70,49 +70,10 @@ jobs:
7070
**/build/reports/checkstyle/
7171
**/build/reports/jacoco/
7272
73-
- name: "Perform CodeQL Analysis"
74-
uses: github/codeql-action/analyze@v2
75-
76-
publish:
77-
name: "Publish"
78-
if: "${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}"
79-
runs-on: "ubuntu-latest"
80-
needs: "validate"
81-
steps:
82-
- name: "Checkout repository"
83-
uses: "actions/checkout@v3"
84-
85-
- name: "Set up JDK ${{ env.JAVA_VERSION }}"
86-
uses: actions/setup-java@v3
73+
- name: "Upload coverage to Codecov"
74+
uses: codecov/codecov-action@v3
8775
with:
88-
java-version: "${{ env.JAVA_VERSION }}"
89-
distribution: "adopt"
90-
91-
- name: "Determine version"
92-
run: |
93-
echo "VERSION=$(./gradlew properties | awk '/^version:/ { print $2; }')" >> $GITHUB_ENV
94-
95-
- name: "Create release"
96-
uses: marvinpinto/action-automatic-releases@latest
97-
with:
98-
repo_token: "${{ secrets.GITHUB_TOKEN }}"
99-
automatic_release_tag: "v${{ env.VERSION }}"
100-
prerelease: "${{ endsWith(env.VERSION, 'SNAPSHOT') }}"
101-
title: "Chameleon v${{ env.VERSION }}"
102-
103-
- name: "Import GPG key"
104-
uses: crazy-max/[email protected]
105-
with:
106-
gpg_private_key: "${{ secrets.GPG_PRIVATE_KEY }}"
76+
fail_ci_if_error: false
10777

108-
- name: "Publish"
109-
uses: gradle/gradle-build-action@v2
110-
with:
111-
arguments: "publish"
112-
env:
113-
ORG_GRADLE_PROJECT_sonatypeUsername: "${{ secrets.SONATYPE_USERNAME }}"
114-
ORG_GRADLE_PROJECT_sonatypePassword: "${{ secrets.SONATYPE_PASSWORD }}"
115-
ORG_GRADLE_PROJECT_hyperaReleasesUsername: "${{ secrets.HYPERA_RELEASES_USERNAME }}"
116-
ORG_GRADLE_PROJECT_hyperaReleasesPassword: "${{ secrets.HYPERA_RELEASES_PASSWORD }}"
117-
ORG_GRADLE_PROJECT_hyperaSnapshotsUsername: "${{ secrets.HYPERA_SNAPSHOTS_USERNAME }}"
118-
ORG_GRADLE_PROJECT_hyperaSnapshotsPassword: "${{ secrets.HYPERA_SNAPSHOTS_PASSWORD }}"
78+
- name: "Perform CodeQL Analysis"
79+
uses: github/codeql-action/analyze@v2

.github/workflows/publish.yml

+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: "Publish"
2+
on:
3+
push:
4+
branches: [ "main" ]
5+
6+
concurrency:
7+
group: "${{ github.workflow }}"
8+
cancel-in-progress: true
9+
10+
env:
11+
JAVA_VERSION: 18
12+
13+
jobs:
14+
release:
15+
name: "Release"
16+
runs-on: "ubuntu-latest"
17+
steps:
18+
- name: "Checkout repository"
19+
uses: actions/checkout@v3
20+
21+
- name: "Set up JDK ${{ env.JAVA_VERSION }}"
22+
uses: actions/setup-java@v3
23+
with:
24+
java-version: "${{ env.JAVA_VERSION }}"
25+
distribution: "adopt"
26+
27+
- name: "Determine version"
28+
run: |
29+
echo "VERSION=$(./gradlew properties | awk '/^version:/ { print $2; }')" >> $GITHUB_ENV
30+
31+
- name: "Import GPG key"
32+
uses: crazy-max/[email protected]
33+
with:
34+
gpg_private_key: "${{ secrets.GPG_PRIVATE_KEY }}"
35+
36+
- name: "Gradle publish"
37+
uses: gradle/gradle-build-action@v2
38+
with:
39+
arguments: "publish"
40+
env:
41+
ORG_GRADLE_PROJECT_sonatypeUsername: "${{ secrets.SONATYPE_USERNAME }}"
42+
ORG_GRADLE_PROJECT_sonatypePassword: "${{ secrets.SONATYPE_PASSWORD }}"
43+
ORG_GRADLE_PROJECT_hyperaReleasesUsername: "${{ secrets.HYPERA_RELEASES_USERNAME }}"
44+
ORG_GRADLE_PROJECT_hyperaReleasesPassword: "${{ secrets.HYPERA_RELEASES_PASSWORD }}"
45+
ORG_GRADLE_PROJECT_hyperaSnapshotsUsername: "${{ secrets.HYPERA_SNAPSHOTS_USERNAME }}"
46+
ORG_GRADLE_PROJECT_hyperaSnapshotsPassword: "${{ secrets.HYPERA_SNAPSHOTS_PASSWORD }}"
47+
48+
- name: "Create release"
49+
uses: ncipollo/release-action@v1
50+
with:
51+
allowUpdates: true
52+
updateOnlyUnreleased: true
53+
generateReleaseNotes: true
54+
name: "Chameleon v${{ env.VERSION }}"
55+
prerelease: "${{ endsWith(env.VERSION, 'SNAPSHOT') }}"
56+
tag: "${{ env.VERSION }}"

.idea/copyright/MIT.xml

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)