Home - RSKrakenCommunity/CommunityAPI GitHub Wiki
Kraken Community uses Gradle as a dependency framework. The Kraken Community has developed a Gradle plugin to ease the development of Kraken Scripts.
Within the settings.gradle declare the plugin management DSL and add the respected repositories and resolution strategies as shown
pluginManagement {
repositories {
gradlePluginPortal()
maven("https://jitpack.io")
}
resolutionStrategy {
eachPlugin {
if(this.requested.id.id == "kraken.community.plugin") {
useModule("com.github.RSKrakenCommunity:Kraken-Gradle-Plugin:master-SNAPSHOT")
}
}
}
}
rootProject.name = "KrakenExampleBot"
pluginManagement {
repositories {
gradlePluginPortal()
maven {
url 'https://jitpack.io'
}
}
resolutionStrategy {
eachPlugin {
if(requested.id.id == 'kraken.community.plugin') {
useModule('com.github.RSKrakenCommunity:Kraken-Gradle-Plugin:master-SNAPSHOT')
}
}
}
}
rootProject.name = 'GroovyKrakenExample'
Within the build.gradle declare the plugin in the plugins DSL
plugins {
//other plugins
id("kraken.community.plugin")
//other plugins
}
plugins {
...
id 'kraken.community.plugin'
...
}
The Kraken Community Gradle plugin eases the development of Kraken Scripts by automating common tasks such as generating the plugins.ini file and copying your compiled jar to the Kraken Plugin Directory.
Kraken Modules
- kraken-api - Provides Krakens' default API
- community-api - Provides the Community API
- imgui - Provides the Community Wrapper for Krakens' ImGui API
- filesystem - Provides a way to read from the rs3 game cache
- definitions - Provides a way to read rs3 game definitions which are stored in the rs3 game cache
- utilities - Provides Utilities for development of kraken scripts
The Kraken Plugin DSL is used to configure the automation of tasks.
kraken {
pluginClass.set("com.rshub.example.ExampleBot")
krakenPluginLocation.set("C:\\Users\\bob\\OneDrive\\Documents\\Kraken")
modules("kraken-api")
}
kraken {
pluginClass = 'com.rshub.example.ExampleBot'
krakenPluginLocation = 'C:\\Users\\bob\\OneDrive\\Documents\\Kraken'
modules('kraken-api')
}
The Kraken Community Gradle Plugin supports setting up of SDN plugins by providing a configuration to use the Kraken Stub.
Warning: The Community API does not support the SDN yet, in order to write scripts for the SDN you cannot use any other modules.
kraken {
//Other configurations
setSDNPlugin(true)
//Other configurations
}
kraken {
//Other configurations
setSDNPlugin(true)
//Other configurations
}