Skip to content

Commit

Permalink
readme: better clarify steps for running the test
Browse files Browse the repository at this point in the history
  • Loading branch information
Felanbird committed Jun 5, 2024
1 parent 9476bd2 commit 2e4e97e
Showing 1 changed file with 23 additions and 15 deletions.
38 changes: 23 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,21 @@ There are two methods to create an external plugin, you can either:

4. Open IntelliJ and choose *Get from Version Control*. Paste the link you just copied in the URL field and where you want to save it in the second field.

5. In order to make sure everything works correctly, try to start the client with your external plugin enabled by running the test. The test requires `-ea` to be added to your VM options to enable assertions, which can be found in IntellIJ in `Run/Debug Configurations` under `Modify options`, `Add VM options`, and then adding `-ea` into the input field which appears.
5. In order to make sure everything works correctly, try to start the client with your external plugin enabled by right-clicking `ExamplePluginTest.java` and clicking run.

![run-test](https://i.imgur.com/tKSQH5e.png)
![run-test](https://github.com/runelite/wiki/assets/41973452/e491216c-546c-4f7f-8db3-a5c0d9a4acbf)

6. Use the refactor tool to rename the package to what you want your plugin to be. Rightclick the package in the sidebar and choose *Refactor > Rename*. I choose to rename it to `com.helmetcheck`.
6. Running the test the first time will fail, due to needing `-ea` to be added to your VM options to enable assertions. This can be done in IntellIJ under `Run/Debug Configurations`, clicking `Modify options` -> `Add VM options`, and then adding `-ea` into the `VM Options` input field that appears.

7. Use the same tool, *Refactor > Rename*, to rename `ExamplePlugin`, `ExampleConfig` and `ExamplePluginTest` to `HelmetCheckPlugin` etc.
![ea](https://github.com/runelite/wiki/assets/41973452/ac4c2761-6d72-4341-9d18-2dd351e1d9a7)

7. Use the refactor tool to rename the package to what you want your plugin to be. Rightclick the package in the sidebar and choose *Refactor > Rename*. I choose to rename it to `com.helmetcheck`.

8. Use the same tool, *Refactor > Rename*, to rename `ExamplePlugin`, `ExampleConfig` and `ExamplePluginTest` to `HelmetCheckPlugin` etc.

8. Go to your plugin file and set its name in the `PluginDescriptor`, this can have spaces.
9. Go to your plugin file and set its name in the `PluginDescriptor`, this can have spaces.

9. Open the `runelite-plugin.properties` file and add info to each row.
10. Open the `runelite-plugin.properties` file and add info to each row.
```
displayName=Helmet check
author=dekvall
Expand All @@ -46,11 +50,11 @@ There are two methods to create an external plugin, you can either:
```
`tags` will make it easier to find your plugin when searching for related words. If you want to add multiple plugin files, the `plugins` field allows for comma separated values, but this is not usually needed.

10. Optionally, you can add an icon to be displayed alongside with your plugin. Place a file with the name `icon.png` no larger than 48x72 px at the root of the repository.
11. Optionally, you can add an icon to be displayed alongside with your plugin. Place a file with the name `icon.png` no larger than 48x72 px at the root of the repository.

11. Write a nice README so your users can see the features of your plugin.
12. Write a nice README so your users can see the features of your plugin.

12. When you have your plugin working. Commit your changes and push them to your repository.
13. When you have your plugin working. Commit your changes and push them to your repository.


### Using the script
Expand All @@ -64,17 +68,21 @@ There are two methods to create an external plugin, you can either:

3. Move the generated folder to its own git repository and open the `build.gradle` file in IntelliJ.

4. In order to make sure everything works correctly, try to start the client with your external plugin enabled by running the test. The test requires `-ea` to be added to your VM options to enable assertions, which can be found in IntellIJ in `Run/Debug Configurations` under `Modify options`, `Add VM options`, and then adding `-ea` into the input field which appears.
4. In order to make sure everything works correctly, try to start the client with your external plugin enabled by right-clicking `ExamplePluginTest.java` and clicking run.

![run-test](https://github.com/runelite/wiki/assets/41973452/e491216c-546c-4f7f-8db3-a5c0d9a4acbf)

5. Running the test the first time will fail, due to needing `-ea` to be added to your VM options to enable assertions. This can be done in IntellIJ under `Run/Debug Configurations`, clicking `Modify options` -> `Add VM options`, and then adding `-ea` into the `VM Options` input field that appears.

![run-test](https://i.imgur.com/tKSQH5e.png)
![ea](https://github.com/runelite/wiki/assets/41973452/ac4c2761-6d72-4341-9d18-2dd351e1d9a7)

5. Edit `runelite-plugin.properties` with tags. `tags` will make it easier to find your plugin when searching for related words. If you want to add multiple plugin files, the `plugins` field allows for comma separated values, but this is not usually needed.
6. Edit `runelite-plugin.properties` with tags. `tags` will make it easier to find your plugin when searching for related words. If you want to add multiple plugin files, the `plugins` field allows for comma separated values, but this is not usually needed.

6. Optionally, you can add an icon to be displayed alongside with your plugin. Place a file with the name `icon.png` no larger than 48x72 px at the root of the repository.
7. Optionally, you can add an icon to be displayed alongside with your plugin. Place a file with the name `icon.png` no larger than 48x72 px at the root of the repository.

7. Write a nice README so your users can see the features of your plugin.
8. Write a nice README so your users can see the features of your plugin.

8. When you have your plugin working. Commit your changes and push them to your repository.
9. When you have your plugin working. Commit your changes and push them to your repository.

### Licensing your repository
1. Go to your repository on GitHub and select *Add file* (next to the green *Code* button), and choose *Create new file* from the drop-down.
Expand Down

0 comments on commit 2e4e97e

Please sign in to comment.