Skip to content

Commit 3298135

Browse files
committed
Merge branch 'main' into new-connection-from-recent-workspaces
2 parents e735198 + fca3a67 commit 3298135

File tree

3 files changed

+108
-3
lines changed

3 files changed

+108
-3
lines changed

.github/readme/qodana.png

96.6 KB
Loading

.github/workflows/build.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ jobs:
104104

105105
# Run Qodana inspections
106106
- name: Qodana - Code Inspection
107-
uses: JetBrains/qodana-action@v4.2.5
107+
uses: JetBrains/qodana-action@v5.1.0
108108

109109
# Prepare plugin archive content for creating artifact
110110
- name: Prepare Plugin Artifact

README.md

+107-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,108 @@
1+
# Coder Gateway Plugin
2+
3+
[!["Join us on
4+
Discord"](https://img.shields.io/badge/join-us%20on%20Discord-gray.svg?longCache=true&logo=discord&colorB=purple)](https://discord.gg/coder)
5+
[![Twitter
6+
Follow](https://img.shields.io/twitter/follow/CoderHQ?label=%40CoderHQ&style=social)](https://twitter.com/coderhq)
7+
[![Coder Gateway Plugin Build](https://github.com/coder/coder-jetbrains/actions/workflows/build.yml/badge.svg)](https://github.com/coder/coder-jetbrains/actions/workflows/build.yml)
8+
19
<!-- 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

Comments
 (0)