Setting Up Development Environment

Category: Development

Setting up your development environment

Step 0 - Pre-requisites

Step 1 - Creating a new project

Create a new project in Intellij IDEA. Make sure to select the options outlined below.

image

After clicking on 'Create', wait until all background tasks are finished in the bottom right corner.

image

Step 2 - Modifying the gradle build configs

To auto import all needed libraries, overwrite everything in the gradle.build.kts with the text below

plugins {
    id 'java' // Alternative id("java")
    id "org.jetbrains.kotlin.jvm" version "1.5.21" // Alternative id("org.jetbrains.kotlin.jvm") version "1.5.21"
}

group 'org.name' // Change to a different name
version '1.0-SNAPSHOT'

repositories {
    mavenCentral()
    google()
    maven {
        url = uri("https://repo.powbot.org/releases")
    }
}

// If failing, alternatively use ""
dependencies {
    implementation('org.powbot:client-sdk:3.0.0-SNAPSHOT') // Can replace with `implementation('org.powbot:client-sdk:3+')` where + tries to pull the latest version
    implementation('org.powbot:client-sdk-loader:3.0.0-SNAPSHOT') // Can replace with `implementation('org.powbot:client-sdk-loader:3+')` where + tries to pull the latest version
    implementation('com.google.guava:guava:31.1-jre') // needed for @Subscribe annotations / event bus  
    implementation('com.fasterxml.jackson.core:jackson-core:2.13.0')
}

Make sure to refresh the gradle configs by either clicking on the little button that comes up on the top right of your screen, or by going to the gradle tab and clicking on the icon.

image image

Step 3 - Start making your script!

You can now start working on your script, everything should be held in the src/main/java/org/example/ path.

image

Example repo

https://github.com/Protoprize/PowBot-Base-Gradle-Project