Skip to content

Commit

Permalink
Merge branch 'master' into hunter-rumours-1-3-2
Browse files Browse the repository at this point in the history
# Conflicts:
#	plugins/hunter-rumours
  • Loading branch information
Joshua Coffey authored and Joshua Coffey committed Dec 7, 2024
2 parents e35eaad + 2ecaaa0 commit 98eb9a0
Show file tree
Hide file tree
Showing 369 changed files with 878 additions and 363 deletions.
4 changes: 4 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
* @runelite/developers
/package/verification-template/ @runelite/plugin-mergers
/plugins/
/README.md
24 changes: 12 additions & 12 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,23 @@ on:
push:
pull_request:
env:
CACHE_VERSION: 2.3.1
CACHE_VERSION: 2.4.0
jobs:
build:
# any forks that predate this repo having an action will have actions
# enabled by default, which will fail in a lot of cases because the branch
# is new, which makes the differential build fail
if: github.event_name != 'push' || github.repository_owner == 'runelite'
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-java@v3
- uses: actions/setup-java@v4
with:
distribution: adopt
java-version: 11
- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: |
~/.gradle/caches/
Expand Down Expand Up @@ -68,12 +68,12 @@ jobs:
export PACKAGE_COMMIT_RANGE="${COMMIT_RANGE:-${COMMIT_BEFORE:+$COMMIT_BEFORE...$COMMIT_AFTER}}"
fi
exec java -XX:+UseParallelGC -cp package/package/build/libs/package.jar net.runelite.pluginhub.packager.Packager
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: manifest_diff
path: /tmp/manifest_diff
retention-days: 1
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: ${{ github.event_name == 'pull_request' }}
with:
name: jars
Expand All @@ -83,22 +83,22 @@ jobs:
if: (github.event_name != 'push' || github.repository_owner == 'runelite') && github.event_name != 'pull_request'
needs: build
concurrency: upload
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 1
- uses: actions/setup-java@v3
- uses: actions/setup-java@v4
with:
distribution: adopt
java-version: 11
- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: |
~/.gradle/caches/
~/.gradle/wrapper/
key: upload-${{ env.CACHE_VERSION }}
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: manifest_diff
path: /tmp
Expand Down
4 changes: 2 additions & 2 deletions LICENSE.templateplugin
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
The contents of the template plugin and the output of the `create_net_plugin.py`
script are, released into the public domain unless otherwise noted.
The contents of the template plugin and the output of the `create_new_plugin.py`
script are, released into the public domain unless otherwise noted.
13 changes: 10 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ We recommend contributing to existing plugins if the author(s) are accepting con
You may contribute to existing plugins by selecting the plugin from https://runelite.net/plugin-hub, navigating to the plugin's GitHub repository by following the "Report an issue" link, and then following the "Create new plugins" section below from step 3.

## Creating new plugins
1. Generate your own repository from the [plugin template](https://github.com/runelite/example-plugin/generate) link.
1. Generate your own repository from the [plugin template](https://github.com/runelite/example-plugin/generate) link (you must be signed into GitHub first).
Alternatively, you may use the `create_new_plugin.py` script provided in this repository to generate a new plugin project.

2. Name your repository something appropriate, in my case I will name it `helmet-check` with the description `You should always wear a helmet.` **Make sure that your repository is set to public**.
Expand Down Expand Up @@ -81,13 +81,20 @@ commit=9db374fc205c5aae1f99bd5fd127266076f40ec8

7. Write a short description of what your plugin does and then create your pull request.

8. Check the result of your PR's CI workflow. With a ✔️ all is good, however if it has a ❌ next to your commit click it to check the build log for details of the failure. Once you've read over the build error, make the required changes, and push another commit to update the PR with the new `commit=` hash.
8. Check the result of your PR's CI workflow, next to `.github/workflows/build.yml / build (pull_request)` will be either a ✔️ or an ❌. With a ✔️ all is good, however if it has an ❌, click `Details` to check the build log for details of the failure. Along with the build workflow there also may be an ❌ next to `RuneLite Plugin Hub Checks`, you will only need to worry about this if it says `View details for requested changes.`, in that case you should also read over those requested changes. Once you've read over the build error and requested changes, make the required changes, and push another commit to update the PR with the new `commit=` hash.
Don't worry about how many times it takes you to resolve build errors; we prefer all changes be kept in a single pull request to avoid spamming notifications with further newly-opened PRs.

9. Be patient and wait for your plugin to be reviewed and merged.

## Updating a plugin
To update a plugin, simply update the manifest with the most recent commit hash.
To update a plugin, simply update the manifest with the most recent commit hash.

It is recommended to open a pull request from a separate branch. You can run the following commands from your `plugin-hub` repository directory to set up a branch:
```bash
$ git remote add upstream https://github.com/runelite/plugin-hub.git # Only necessary if you have not set it before
$ git fetch upstream && git checkout -B <your-plugin-name> upstream/master
```
Once your changes have been merged, you can delete the branch. The next time you would like to update your plugin, you can create the branch again.

## Reviewing
We will review your plugin to ensure it isn't malicious, doesn't [break Jagex's rules](https://secure.runescape.com/m=news/third-party-client-guidelines?oldschool=1),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,11 @@ public void recordClass(int modifiers, String descriptor)
}
}

public void recordClassHierarchy(String from, String superDescriptor)
{
apis.add(from + ">" + superDescriptor);
}

public void recordMethod(int modifiers, String classDescriptor, CharSequence name, String descriptor)
{
if (classDescriptor != null & descriptor != null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@ public void visit(int version, int access, String name, String signature, String
{
this.className = "L" + name + ";";
api.recordClass(access, className);
api.recordClassHierarchy(this.className, "L" + superName + ";");
for (String iface : interfaces)
{
api.recordClassHierarchy(this.className, "L" + iface + ";");
}
super.visit(version, access, name, signature, superName, interfaces);
}

Expand Down Expand Up @@ -102,7 +107,7 @@ public void recordClass(File jarFile) throws IOException
}
}

public static void main(String ...classes) throws IOException
public static void main(String... classes) throws IOException
{
var cr = new ClassRecorder();
Iterator<String> args = List.of(classes).iterator();
Expand Down
Loading

0 comments on commit 98eb9a0

Please sign in to comment.