-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
22 changed files
with
720 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
.gradle | ||
.settings | ||
.vscode | ||
bin | ||
build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
packages: | ||
- name: plugin | ||
type: generic | ||
deps: | ||
- components/supervisor-api/java:lib | ||
- components/gitpod-protocol/java:lib | ||
srcs: | ||
- "**/*.kt" | ||
- "build.gradle.kts" | ||
- "gradle.properties" | ||
- "gradle/wrapper/*" | ||
- "gradlew" | ||
- "settings.gradle.kts" | ||
env: | ||
- JAVA_HOME=/home/gitpod/.sdkman/candidates/java/current | ||
config: | ||
commands: | ||
- ["./gradlew", "-PsupervisorApiProjectPath=components-supervisor-api-java--lib/", "-PgitpodProtocolProjectPath=components-gitpod-protocol-java--lib/", "buildPlugin"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Jetbrains IDE Backend Plugin | ||
|
||
<!-- Plugin description --> | ||
Jetbrains IDE backend plugin to provide support for Gitpod. | ||
|
||
When installed in the headless Jetbrains IDE running in a Gitpod workspace, this plugin monitors user activity of the client IntelliJ and sends heartbeats accordingly. Avoiding the workspace timing out. | ||
<!-- Plugin description end --> | ||
|
||
**Warning**: Currently, given the challenge of mimicking user activity in a local Jetbrains IDE, there are no automated integration tests testing the functionality of this plugin. Please be particularly careful and manually test your changes. | ||
|
||
## Usage | ||
|
||
1. Produce the plugin by running `./gradlew buildPlugin`. | ||
2. Unzip `build/distributions/jetbrains-backend-plugin-1.0-SNAPSHOT.zip` to the `plugins/` folder of the headless Jetbrains IDE. | ||
3. Start the headless Jetbrains IDE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
// Copyright (c) 2021 Gitpod GmbH. All rights reserved. | ||
// Licensed under the GNU Affero General Public License (AGPL). | ||
// See License-AGPL.txt in the project root for license information. | ||
|
||
import io.gitlab.arturbosch.detekt.Detekt | ||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile | ||
|
||
fun properties(key: String) = project.findProperty(key).toString() | ||
|
||
plugins { | ||
// Java support | ||
id("java") | ||
// Kotlin support | ||
id("org.jetbrains.kotlin.jvm") version "1.5.10" | ||
// gradle-intellij-plugin - read more: https://github.com/JetBrains/gradle-intellij-plugin | ||
id("org.jetbrains.intellij") version "1.0" | ||
// detekt linter - read more: https://detekt.github.io/detekt/gradle.html | ||
id("io.gitlab.arturbosch.detekt") version "1.17.1" | ||
// ktlint linter - read more: https://github.com/JLLeitschuh/ktlint-gradle | ||
id("org.jlleitschuh.gradle.ktlint") version "10.0.0" | ||
} | ||
|
||
group = properties("pluginGroup") | ||
version = properties("version") | ||
|
||
// Configure project's dependencies | ||
repositories { | ||
mavenCentral() | ||
} | ||
|
||
dependencies { | ||
implementation(project(":supervisor-api")) | ||
implementation(project(":gitpod-protocol")) | ||
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.2") | ||
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-guava:1.5.2") | ||
implementation("io.ktor:ktor-client-core:1.6.3") | ||
implementation("io.ktor:ktor-client-cio:1.6.3") | ||
implementation("io.ktor:ktor-client-jackson:1.6.3") | ||
|
||
detektPlugins("io.gitlab.arturbosch.detekt:detekt-formatting:1.18.1") | ||
|
||
testImplementation(kotlin("test")) | ||
} | ||
|
||
// Configure gradle-intellij-plugin plugin. | ||
// Read more: https://github.com/JetBrains/gradle-intellij-plugin | ||
intellij { | ||
pluginName.set(properties("pluginName")) | ||
version.set(System.getenv("INTELLIJ_PLUGIN_PLATFORM_VERSION")) | ||
type.set(properties("platformType")) | ||
instrumentCode.set(false) | ||
downloadSources.set(properties("platformDownloadSources").toBoolean()) | ||
updateSinceUntilBuild.set(true) | ||
|
||
// Plugin Dependencies. Uses `platformPlugins` property from the gradle.properties file. | ||
plugins.set(properties("platformPlugins").split(',').map(String::trim).filter(String::isNotEmpty)) | ||
} | ||
|
||
// Configure detekt plugin. | ||
// Read more: https://detekt.github.io/detekt/kotlindsl.html | ||
detekt { | ||
autoCorrect = true | ||
buildUponDefaultConfig = true | ||
|
||
reports { | ||
html.enabled = false | ||
xml.enabled = false | ||
txt.enabled = false | ||
} | ||
} | ||
|
||
tasks { | ||
withType<JavaCompile> { | ||
sourceCompatibility = "11" | ||
targetCompatibility = "11" | ||
} | ||
withType<KotlinCompile> { | ||
kotlinOptions.jvmTarget = "11" | ||
} | ||
|
||
withType<Detekt> { | ||
jvmTarget = "11" | ||
} | ||
|
||
test { | ||
useJUnitPlatform() | ||
} | ||
|
||
runPluginVerifier { | ||
ideVersions.set(properties("pluginVerifierIdeVersions").split(',').map(String::trim).filter(String::isNotEmpty)) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
version=1.0-SNAPSHOT | ||
|
||
# IntelliJ Platform Artifacts Repositories | ||
# -> https://plugins.jetbrains.com/docs/intellij/intellij-artifacts.html | ||
|
||
pluginGroup = io.gitpod.ide.jetbrains.backend | ||
pluginName = jetbrains-backend-plugin | ||
|
||
# See https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html | ||
# for insight into build numbers and IntelliJ Platform versions. | ||
pluginSinceBuild = 213 | ||
pluginUntilBuild = 213.* | ||
|
||
# Plugin Verifier integration -> https://github.com/JetBrains/gradle-intellij-plugin#plugin-verifier-dsl | ||
# See https://jb.gg/intellij-platform-builds-list for available build versions. | ||
pluginVerifierIdeVersions = 2021.3.1 | ||
|
||
platformType = IU | ||
platformDownloadSources = true | ||
|
||
# Plugin Dependencies -> https://plugins.jetbrains.com/docs/intellij/plugin-dependencies.html | ||
# Example: platformPlugins = com.intellij.java, com.jetbrains.php:203.4449.22 | ||
platformPlugins = | ||
|
||
# Opt-out flag for bundling Kotlin standard library. | ||
# See https://plugins.jetbrains.com/docs/intellij/kotlin.html#kotlin-standard-library for details. | ||
kotlin.stdlib.default.dependency = false | ||
|
||
supervisorApiProjectPath = ../../../supervisor-api/java | ||
gitpodProtocolProjectPath = ../../../gitpod-protocol/java |
Binary file added
BIN
+57.8 KB
components/ide/jetbrains/backend-plugin/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
5 changes: 5 additions & 0 deletions
5
components/ide/jetbrains/backend-plugin/gradle/wrapper/gradle-wrapper.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
Oops, something went wrong.