|
| 1 | +# Coder Gateway Plugin |
| 2 | + |
| 3 | +[](https://discord.gg/coder) |
| 5 | +[](https://twitter.com/coderhq) |
| 7 | +[](https://github.com/coder/coder-jetbrains/actions/workflows/build.yml) |
| 8 | + |
1 | 9 | <!-- Plugin description -->
|
2 |
| -**Coder Gateway** connects to [Coder Workspaces](https://coder.com/docs/coder/latest/workspaces) |
3 |
| -<!-- Plugin description end --> |
| 10 | +**Coder Gateway** connects your Jetbrains IDE to your [Coder Workspaces](https://coder.com/docs/coder/latest/workspaces) so that you can develop from anywhere. |
| 11 | + |
| 12 | +**Manage less** |
| 13 | + |
| 14 | +- Ensure your entire team is using the same tools and resources |
| 15 | +- Keep your source code and data behind your firewall |
| 16 | + |
| 17 | +**Code more** |
| 18 | + |
| 19 | +- Build and test faster |
| 20 | + - Leveraging cloud CPUs, RAM, network speeds, etc. |
| 21 | +- Access your environment from any place |
| 22 | +- Onboard instantly then stay up to date continuously |
| 23 | + |
| 24 | +<!-- Plugin description end --> |
| 25 | + |
| 26 | +## Getting Started |
| 27 | + |
| 28 | +To manually install a local build: |
| 29 | + |
| 30 | +1. Install [Jetbrains Gateway](https://www.jetbrains.com/help/phpstorm/remote-development-a.html#gateway) |
| 31 | +2. run `./gradlew clean buildPlugin` to generate a zip distribution |
| 32 | +3. locate the zip file in the `build/distributions` folder and follow [these instructions](https://www.jetbrains.com/help/idea/managing-plugins.html#install_plugin_from_disk) on how to install a plugin from disk. |
| 33 | + |
| 34 | +Alternatively, `./gradlew clean runIde` will deploy a Gateway distribution (the one specified in `gradle.properties` - `platformVersion`) with the latest plugin changes deployed. |
| 35 | + |
| 36 | +### Plugin Structure |
| 37 | + |
| 38 | +``` |
| 39 | +. |
| 40 | +├── .github/ GitHub Actions workflows and Dependabot configuration files |
| 41 | +├── gradle |
| 42 | +│ └── wrapper/ Gradle Wrapper |
| 43 | +├── build/ Output build directory |
| 44 | +├── src Plugin sources |
| 45 | +│ └── main |
| 46 | +│ ├── kotlin/ Kotlin production sources |
| 47 | +│ └── resources/ Resources - plugin.xml, icons, i8n |
| 48 | +│ └── test |
| 49 | +│ ├── kotlin/ Kotlin test sources |
| 50 | +├── .gitignore Git ignoring rules |
| 51 | +├── build.gradle.kts Gradle configuration |
| 52 | +├── CHANGELOG.md Full change history |
| 53 | +├── gradle.properties Gradle configuration properties |
| 54 | +├── gradlew *nix Gradle Wrapper script |
| 55 | +├── gradlew.bat Windows Gradle Wrapper script |
| 56 | +├── qodana.yml Qodana profile configuration file |
| 57 | +├── README.md README |
| 58 | +└── settings.gradle.kts Gradle project settings |
| 59 | +``` |
| 60 | + |
| 61 | +`src` directory is the most important part of the project, the Coder Gateway implementation and the manifest for the plugin – [plugin.xml][file:plugin.xml]. |
| 62 | + |
| 63 | +### Gradle Configuration Properties |
| 64 | + |
| 65 | +The project-specific configuration file [gradle.properties][file:gradle.properties] contains: |
| 66 | + |
| 67 | +| Property name | Description | |
| 68 | +| --------------------------- |---------------------------------------------------------------------------------------------------------------| |
| 69 | +| `pluginGroup` | Package name, set to `com.coder.gateway`. | |
| 70 | +| `pluginName` | Zip filename. | |
| 71 | +| `pluginVersion` | The current version of the plugin in [SemVer](https://semver.org/) format. | |
| 72 | +| `pluginSinceBuild` | The `since-build` attribute of the `<idea-version>` tag. The minimum Gateway build supported by the plugin | |
| 73 | +| `pluginUntilBuild` | The `until-build` attribute of the `<idea-version>` tag. Supported Gateway builds, until & not inclusive | |
| 74 | +| `platformType` | The type of IDE distribution, in this GW. | |
| 75 | +| `platformVersion` | The version of the Gateway used to build&run the plugin. | |
| 76 | +| `platformDownloadSources` | Gateway sources downloaded while initializing the Gradle build. Note: Gateway does not have open sources | |
| 77 | +| `platformPlugins` | Comma-separated list of dependencies to the bundled Gateway plugins and plugins from the Plugin Repositories. | |
| 78 | +| `javaVersion` | Java language level used to compile sources and generate the files for - Java 11 is required since 2020.3. | |
| 79 | +| `gradleVersion` | Version of Gradle used for plugin development. | |
| 80 | + |
| 81 | +The properties listed define the plugin itself or configure the [gradle-intellij-plugin][gh:gradle-intellij-plugin] – check its documentation for more details. |
| 82 | + |
| 83 | +### Testing |
| 84 | + |
| 85 | +No functional or UI tests are available yet. |
| 86 | + |
| 87 | +### Code Monitoring |
| 88 | + |
| 89 | +Code quality is monitored with the help of [Qodana](https://www.jetbrains.com/qodana/) |
| 90 | + |
| 91 | +Qodana inspections are accessible within the project on two levels: |
| 92 | + |
| 93 | +- using the [Qodana IntelliJ GitHub Action][docs:qodana-github-action], run automatically within the [Build](.github/workflows/build.yml) workflow, |
| 94 | +- with the [Gradle Qodana Plugin][gh:gradle-qodana-plugin], so you can use it on the local environment or any CI other than GitHub Actions. |
| 95 | + |
| 96 | +Qodana inspection is configured with the `qodana { ... }` section in the [Gradle build file][file:build.gradle.kts] and [`qodana.yml`][file:qodana.yml] YAML configuration file. |
| 97 | + |
| 98 | +> **NOTE:** Qodana requires Docker to be installed and available in your environment. |
| 99 | +
|
| 100 | +To run inspections, you can use a predefined *Run Qodana* configuration, which will provide a full report on `http://localhost:8080`, or invoke the Gradle task directly with the `./gradlew runInspections` command. |
| 101 | + |
| 102 | +A final report is available in the `./build/reports/inspections/` directory. |
| 103 | + |
| 104 | +![Qodana][file:qodana.png] |
| 105 | + |
| 106 | +### Plugin compatibility |
| 107 | + |
| 108 | +`./gradlew runPluginVerifier` can check the plugin compatibility against the specified Gateway. The integration with Githug Actions is commented until [this gradle intellij plugin issue](https://github.com/JetBrains/gradle-intellij-plugin/issues/1027) is fixed. |
0 commit comments