Commit Graph
14 Commits
Author SHA1 Message Date
swazrgb 94c5be4089 Merge remote-tracking branch 'runelite/master' into runelite-2020-06-25-1 2020-06-25 19:39:16 +02:00
swazrgb f375f7503a Add inputs & output definitions to script assembler plugin
Also have assembler scripts be output into build directory

Partially fixes #2665
2020-06-11 06:34:51 +02:00
swazrgb 9d9f7ff18b Shutdown ExecutorService during CLientUI shutdown 2020-06-11 05:03:58 +02:00
swazrgb b22400454d Provide a scaling ExecutorService and use it from plugin managers
The new ExecutorService is configured to consume up to 2*CPU threads
and will queue tasks when all threads are busy. Threads are created
as needed, and will be disposed of after 1 minute of inactivity.
2020-06-11 04:53:36 +02:00
swazrgb 66db2c7986 Remove SoundsClient 2020-05-26 23:36:27 +02:00
swazrgb 87e4cbc921 Remove AnimationsClient 2020-05-26 23:35:24 +02:00
swazrgb 411680e98a Remove XteaClient 2020-05-26 23:34:48 +02:00
swazrgb 4769802524 Switch repo.runelite.net url to https 2020-05-26 23:33:42 +02:00
swazrgb b8bf019667 client: Set JarPluginRepository#comparator to null
The default pf4j comparator casts longs to ints which breaks
the sort. Since we don't actually rely on this sorting, simply
set the comparator to `null`.

See https://github.com/open-osrs/runelite/pull/2621 for more info
2020-05-25 15:47:48 +02:00
swazrgb 0890be9c30 Also clear repositories when split length is invalid 2020-05-24 23:38:39 +02:00
swazrgb 052ebc3c7b client: Clean up ExternalPluginManager & friends 2020-05-24 23:17:34 +02:00
swazrgb 1644dbd245 Also shutdown executor in PluginManager 2020-05-24 19:17:20 +02:00
swazrgb e23c6a0c46 Support loading external plugins from sources enabling hotswapping
Enables the pf4j [development mode](https://pf4j.org/doc/development-mode.html)
to support loading external plugins from sources, which enables java's
hotswap functionality.

To use this feature set the `plugin.development.path` property or
`PLUGIN_DEVELOPMENT_PATH` environment variable to the directories
containing your plugins, e.g. `../plugins;../my-custom-plugins`

Once set the `ExternalPluginManager` will ignore the configured
repositories and externalmanager directory, and instead load all
the built plugins from the specified directories.

Utilizing this feature does require some additional configuration
of the build of the plugins `build.gradle.kts`. Within the `subprojects`
section add:

```
tasks.register<Copy>("copyDeps") {
    into("./build/deps/")
    from(configurations["runtimeClasspath"])
}
```

See https://github.com/open-osrs/plugins/pull/260 for the `openosrs/plugins` change

This enables the following workflow:

0. Optional tip: Set the `external.system.substitute.library.dependencies` registry value to `true` to force classpath resolution within the project

1. Open the `runelite-client` project in IntelliJ

2. Add the `plugins` repository as a module (Gradle -> Plus symbol ->
`plugins/build.gradle.kts`)

3. Gradle build the client with: `build publishToMavenLocal :runelite-client:publishToMavenLocal :runelite-api:publishToMavenLocal :http-api:publishToMavenLocal`

4. Gradle build the plugins with: `build copyDeps`

5. Add the `PLUGIN_DEVELOPMENT_PATH` environment variable to the run
configuration

Once the above is done the edit -> reload -> edit cycle can begin:

1. Start the client in debug mode using the run goal

2. Edit the external plugin

3. Perform Build > Build Module

4. Observe hotswapping in action!

5. If hotswapping failed, or your change requires a plugin restart,
click the hotswap button in the plugin list to instantly restart it
2020-05-24 08:27:37 +02:00
swazrgb 3ce0cb9dc1 Shutdown ExecutorService in ExternalPluginManager
Also name threads for easy identification
2020-05-24 03:29:30 +02:00