Jump to content

Tutorial: How to make Kotlin work


Recommended Posts

Posted (edited)

1. Follow this tutorial!
Script Development Setup

2. Create your base class script inside of src directory

@ScriptManifest(name = "Example", author = "Example", version = 1.0, info = "Example", logo = "")
class OsbotScriptTemplate : Script() {
    override fun onLoop(): Int {
        TODO("Not yet implemented")
    }
}

3. Build your project. (Build > Build Project)

4. You should see a lib folder with a bunch of kotlin library in it

5. Go back to File > Project Structure > Artifacts, assuming you followed step one correctly, you should already have an artifact. If not, go back to step 1!

unknown.png

6. On the right side under Available Elements you should see KotlinJavaRuntime , right click on this, and select extract into Output Root

unknown.png

7. Rebuild your project, and you should now be able to run your Kotlin based script!

Edited by Shmeekz
  • Like 2
  • 4 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...