Jump to content

Tutorial: How to make Kotlin work


Shmeekz

Recommended Posts

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
Link to comment
Share on other sites

  • 4 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

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