-
-
Notifications
You must be signed in to change notification settings - Fork 450
Building the plugins with IntelliJ IDEA
This guide requires you to have built the OpenOSRS Client already, if not, please follow this guide: Building with IntelliJ-IDEA
Warning: This guide is not setup to be used with GitHub as I don't personally use it, if someone wishes to edit the guide to please feel free to do so.
- Open Intellij IDEA and click Get from Version Control
- In the URL text box, enter
https://github.com/open-osrs/plugins
- Click Yes in the 'Checkout From Version Control' Popup.
- Wait for the plugins to import.
- When the plugins have been imported, you should see multiple errors with a red exclamation mark at the bottom of Intellij IDEA. Ignore those for now.
- Select the top left option: File > Close Project.
- You should now be met with the
Welcome to IntelliJ IDEA
screen, if not, open up the IntelliJ IDEA program and you should see bothOpenOSRS Plugins
andOpenOSRS
in the left hand side of the Welcome Screen. Select theOpenOSRS
option.
- Open the
Gradle
tab on the right hand side and you should see theOpenOSRS
client on it's own.
- Press the + button and navigate inside the
plugins
folder. Scroll down past the plugins and select thebuild.gradle.kts
file.
- In the Gradle tab, you should now have both
OpenOSRS
andOpenOSRS Plugins
.
- In the Project tab on the left hand side, expand the
plugins [OpenOSRS Plugins]
and scroll down to the bottom until you findbuild.gradle.kts
, double left click it.
- The file
build.gradle.kts
will have opened in IntelliJ IDEA, scroll down until you seeinto("../release/")
.
-
Choose a folder path of your preference and replace
../release/
with it, for exampleC:/Users/TOM-PC/IdeaProjects/plugin jar
Make sure you replace \ with /. -
You can now close the
build.gradle.kts
file. Open the Gradle tab on the right side, and expand OpenOSRS > Tasks > build, and right click the build file, selectEdit runelite[build]
(If there is only create, choose that option instead, although if you following the Client build guide in the link above, it should be edit.)
-
The
Edit Run Configuration 'runelite [build]' menu should now be open, inside the Arguments text box, replace
-x testwith
publishToMavenLocal :runelite-client:publishToMavenLocal :runelite-api:publishToMavenLocal :http-api:publishToMavenLocal -x test -x checkstyleMain`. -
Left click the + icon below the
Before launch: Activate tool window
tab, and selectRun Gradle task
.
- Click the Folder icon with the blue square, scroll down and select OpenOSRS Plugins. Inside the Gradle project: text box should now say
plugins
, in the Tasks: text box, enterbuild
, in the Arguments: text box, enter-x test -x checkstyleMain
. If done right, you should see the same as the picture below.
- Press OK. If you have followed step 14-18 correctly, your runelite [build] should look like the picture below, if so, click OK.
Congratulations, you have now build the OpenOSRS Plugins. Earlier when you replaced release
with your path of choice in the build.gradle.kts
file, that's where the .jar files will be located, don't forget to copy and paste them into your .runelite/externalmanager
folder to see the changes you have made.
- To test that the OpenOSRS Plugins are building with IntelliJ IDEA, you can test this by editing a plugin. In the Projects tab on the left side, expand
plugins [OpenOSRS Plugins] > bank > src > main > java > net.runelite.client.plugins.bank and open BankConfig. Edit
Show Values, to say
Show Values TESTING BUILD`.
-
Open the Gradle tab on the right, expand
OpenOSRS > Tasks > build
and right click on the build tab, select `Run 'runelite [build]' -
Earlier when you replaced
release
with your path of choice in thebuild.gradle.kts
file, that's where the .jar files will be located, don't forget to copy and paste them into your.runelite/externalmanager
folder to see the changes you have made. In this case, we will be moving the bank-x.x.x.jar file.
- Start a new OpenOSRS Client (inside of IntelliJ IDEA or by running the OpenOSRS.exe), open the plugins tab, and enter the Bank configuration menu, you should see your changes:
Please join our Discord if you notice anything wrong or would like to discuss an addition to the wiki.
-
User Guide
-
Developer's Guide
- Setting up development environment
- Using Git with RuneLite
- How RuneLite works
- Using RuneLite's mixins