intellij-platform-gradle-plugin icon indicating copy to clipboard operation
intellij-platform-gradle-plugin copied to clipboard

support of remote dev

Open akosyakov opened this issue 2 years ago • 4 comments

At Gitpod we are building a plugin for JB backend: https://github.com/gitpod-io/gitpod/tree/main/components/ide/jetbrains/backend-plugin

In order to test we have to run in Gitpod workspace container which does not have UI and does not need it since we use Gateway and thin client to connect. Running it locally is not the option since we need Gitpod workspace services for this plugin to work.

Unfortunately ./gradlew runIde although does not start IDE in headless more akin to remote-dev-server plugin. It would be good if such use case is supported as well 🙏

As for now we built a custom shell script to launch the same JB backend with built plugin in remote mode. It gets us going but having something more native would be better.

akosyakov avatar Feb 09 '22 08:02 akosyakov

@akosyakov Don't you mind sharing more details on this approach? What exactly would be helpful to introduce in the Gradle IntelliJ Plugin?

hsz avatar Mar 28 '22 12:03 hsz

I would like to run something like ./gradlew runIde --headless which starts IDE in the backend mode with my plugin.

Right now we emulate something like that with custom shell script: https://github.com/gitpod-io/gitpod/blob/main/components/ide/jetbrains/backend-plugin/launch-dev-server.sh

akosyakov avatar Mar 30 '22 07:03 akosyakov

What about

tasks {
    runIde {
        systemProperty("java.awt.headless", "true")
    }
}

hsz avatar Mar 30 '22 09:03 hsz

It fails with:

No valid license found
2022-03-30 12:10:00,754 [   2096]  ERROR -                #LicenseManager - No valid license found 
java.lang.Throwable: No valid license found

I'm actually not sure that just enabling headless mode is enough, if you look at ./plugins/remote-dev-server/bin/launcher.sh of JB backend it changes idea properties to disable some things.

akosyakov avatar Mar 30 '22 12:03 akosyakov