Skip to content
This repository has been archived by the owner on Apr 8, 2023. It is now read-only.

Building the plugins with IntelliJ IDEA

TomMartow edited this page Mar 17, 2020 · 20 revisions

OpenOSRS Plugins

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.

Detailed Guide:

  1. Open Intellij IDEA and click Get from Version Control

1.

  1. In the URL text box, enter https://github.com/open-osrs/plugins

2.

  1. Click Yes in the 'Checkout From Version Control' Popup.

3.

  1. Wait for the plugins to import.

4.

  1. 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.

5.

  1. Select the top left option: File > Close Project.

6.

  1. You should now be met with the Welcome to IntelliJ IDEA screen, if not, open up the IntelliJ IDEA program and you should see both OpenOSRS Plugins and OpenOSRS in the left hand side of the Welcome Screen. Select the OpenOSRS option.

7.

  1. Open the Gradle tab on the right hand side and you should see the OpenOSRS client on it's own.

8.

  1. Press the + button and navigate inside the plugins folder. Scroll down past the plugins and select the build.gradle.kts file.

9.

  1. In the Gradle tab, you should now have both OpenOSRS and OpenOSRS Plugins.

10.

  1. In the Project tab on the left hand side, expand the plugins [OpenOSRS Plugins] and scroll down to the bottom until you find build.gradle.kts, double left click it.

11.

  1. The file build.gradle.kts will have opened in IntelliJ IDEA, scroll down until you see into("../release/").

12.

  1. Choose a folder path of your preference and replace ../release/ with it, for example C:/Users/TOM-PC/IdeaProjects/plugin jar Make sure you replace \ with /.

  2. 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, select Edit 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.)

14.

  1. The Edit Run Configuration 'runelite [build]' menu should now be open, inside the Arguments text box, replace -x testwithpublishToMavenLocal :runelite-client:publishToMavenLocal :runelite-api:publishToMavenLocal :http-api:publishToMavenLocal -x test -x checkstyleMain`.

  2. Left click the + icon below the Before launch: Activate tool window tab, and select Run Gradle task.

16.

  1. 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, enter build, in the Arguments: text box, enter -x test -x checkstyleMain. If done right, you should see the same as the picture below.

17.

  1. Press OK. If you have followed step 14-18 correctly, your runelite [build] should look like the picture below, if so, click OK.

18.

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.

The following is optional:

  1. 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`.

19.

  1. Open the Gradle tab on the right, expand OpenOSRS > Tasks > build and right click on the build tab, select `Run 'runelite [build]'

  2. 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. In this case, we will be moving the bank-x.x.x.jar file.

21

  1. 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:

22.