Custom SDK - Bundled with Plugin?

I'm writing a custom language plugin and I'll need a custom SDK.  The SDK won't be distributed separately (like Java is).  I'm writing my own SDK which will compile the classes in the cloud.  I'd like to bundle the SDK within the plugin JAR.

Is there a way - when the user creates a new module for my custom language - that I programatically configure the SDK and assign it to the project?

I've looked at the SdkType class, but it looks more suited for folder based SDKs.   For my SDK, I would just need to setup the classpath pointing to my plugin's jar.

Comment actions Permalink

It should be quite possible to define such a "home-folder-less" SDK.

You can store/retrieve additional data via SdkAdditionalData (see org.jetbrains.idea.devkit.projectRoots.Sandbox of DevKit plugin) to build paths to corresponding JARs for your SDK.

What exactly does not work for you?

Comment actions Permalink

Perfect!  That's exactly what I was looking for.  Thanks!


Please sign in to leave a comment.