Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions components/BUILD.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ packages:
- components/ide/jetbrains/launcher:docker
- components/ide/jetbrains/backend-plugin:stable
- components/ide/jetbrains/backend-plugin:latest
- components/ide/jetbrains/backend-plugin:stable-rider
- components/ide/jetbrains/backend-plugin:latest-rider
- components/ide/jetbrains/image:goland
- components/ide/jetbrains/image:goland-latest
- components/ide/jetbrains/image:intellij
Expand Down
2 changes: 2 additions & 0 deletions components/ide/gha-update-image/lib/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,8 @@ export const getLatestInstallerVersions = async (version?: string) => {
intellijLatest: versionObj,
jbBackendPlugin: versionObj,
jbBackendPluginLatest: versionObj,
jbBackendPluginRider: versionObj,
jbBackendPluginLatestRider: versionObj,
jbLauncher: versionObj,
phpstorm: versionObj,
phpstormLatest: versionObj,
Expand Down
2 changes: 1 addition & 1 deletion components/ide/gha-update-image/lib/jb-pin-version.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export const appendPinVersionsIntoIDEConfigMap = async (updatedIDEs: string[] |
for (const [ide, versionObject] of Object.entries(latestInstallerVersions.components.workspace.desktopIdeImages)) {
if (
ide.includes("Latest") ||
["codeDesktop", "codeDesktopInsiders", "jbLauncher", "jbBackendPlugin", "jbBackendPluginLatest"].includes(
["codeDesktop", "codeDesktopInsiders", "jbLauncher", "jbBackendPlugin", "jbBackendPluginLatest", "jbBackendPluginRider", "jbBackendPluginLatestRider"].includes(
ide,
)
) {
Expand Down
94 changes: 94 additions & 0 deletions components/ide/jetbrains/backend-plugin/BUILD.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ packages:
deps:
- :stable
- :latest
- :stable-rider
- :latest-rider
- name: stable
type: docker
deps:
Expand Down Expand Up @@ -32,6 +34,34 @@ packages:
JETBRAINS_BACKEND_QUALIFIER: latest
image:
- ${imageRepoBase}/ide/jb-backend-plugin:commit-${__git_commit}-latest
- name: stable-rider
type: docker
deps:
- :plugin-stable-rider
argdeps:
- imageRepoBase
config:
dockerfile: leeway.Dockerfile
metadata:
helm-component: workspace.desktopIdeImages.jbBackendPluginRider
buildArgs:
JETBRAINS_BACKEND_QUALIFIER: stable-rider
image:
- ${imageRepoBase}/ide/jb-backend-plugin:commit-${__git_commit}-rider
- name: latest-rider
type: docker
deps:
- :plugin-latest-rider
argdeps:
- imageRepoBase
config:
dockerfile: leeway.Dockerfile
metadata:
helm-component: workspace.desktopIdeImages.jbBackendPluginLatestRider
buildArgs:
JETBRAINS_BACKEND_QUALIFIER: latest-rider
image:
- ${imageRepoBase}/ide/jb-backend-plugin:commit-${__git_commit}-rider-latest
- name: plugin-stable
type: generic
argdeps:
Expand Down Expand Up @@ -91,6 +121,70 @@ packages:
&& source "$SDKMAN_DIR/bin/sdkman-init.sh"
&& sdk env install
&& ./build.sh ${__git_commit}
- name: plugin-stable-rider
type: generic
argdeps:
- noVerifyJBPlugin
deps:
- components/supervisor-api/java:lib
- components/gitpod-protocol/java:lib
srcs:
- "**/*.kt"
- "build.gradle-stable.kts"
- "gradle.properties"
- "gradle-stable-rider.properties"
- "gradle/wrapper/*"
- "gradlew"
- "settings.gradle.kts"
- "src/main/resources/*"
- "src/main/resources-stable/*"
- "src/main/resources-rider/*"
- "build.sh"
env:
- JB_QUALIFIER=stable-rider
- NO_VERIFY_JB_PLUGIN=${noVerifyJBPlugin}
config:
commands:
- ["mv", "build.gradle-stable.kts", "build.gradle.kts"]
- ["./build.sh", "${__git_commit}"]
- name: plugin-latest-rider
type: generic
argdeps:
- noVerifyJBPlugin
deps:
- components/supervisor-api/java:lib
- components/gitpod-protocol/java:lib
srcs:
- "**/*.kt"
- "build.gradle-latest.kts"
- "gradle.properties"
- "gradle-latest.properties"
- "gradle-latest-rider.properties"
- "gradle/wrapper/*"
- "gradlew"
- "settings.gradle.kts"
- "src/main/resources/*"
- "src/main/resources-latest/*"
- "src/main/resources-rider/*"
- "build.sh"
env:
# TODO(hw): uncomment next line after Rider fix codeWithMe issue
# - JB_QUALIFIER=latest-rider
- JB_QUALIFIER=latest
- NO_VERIFY_JB_PLUGIN=${noVerifyJBPlugin}
# TODO(hw): remove after `2024.2.*` is stable
- SDKMAN_DIR=/home/gitpod/.sdkman
config:
commands:
# TODO(hw): remove after 2024.2.* is stable
- ["mv", "build.gradle-latest.kts", "build.gradle.kts"]
- - "bash"
- "-c"
- >
echo java=21.0.3.fx-zulu > .sdkmanrc
&& source "$SDKMAN_DIR/bin/sdkman-init.sh"
&& sdk env install
&& ./build.sh ${__git_commit}
- name: latest-info
type: generic
srcs:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,30 @@ project(":") {
kotlin {
val excludedPackage = if (environmentName == "latest") "stable" else "latest"
sourceSets["main"].kotlin.exclude("io/gitpod/jetbrains/remote/${excludedPackage}/**")

if (properties("platformType") == "RD") {
print("Rider: exclude unnecessary files")
sourceSets["main"].kotlin.exclude("**/GitpodForceUpdateMavenProjectsActivity.kt")
sourceSets["main"].kotlin.exclude("**/maven.xml")
}
}

sourceSets {
main {
resources.srcDirs("src/main/resources-${environmentName}")
resources.srcDirs("src/main/resources")
if (properties("platformType") == "RD") {
print("Rider: import rider source set")
resources.srcDirs("src/main/resources-rider")
}
resources.srcDirs("src/main/resources-${environmentName.replace("-rider", "")}")
}
}
}

tasks.named<ProcessResources>("processResources") {
duplicatesStrategy = DuplicatesStrategy.WARN
}

// Configure project's dependencies
repositories {
mavenCentral()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,30 @@ project(":") {
kotlin {
val excludedPackage = if (environmentName == "latest") "stable" else "latest"
sourceSets["main"].kotlin.exclude("io/gitpod/jetbrains/remote/${excludedPackage}/**")

if (properties("platformType") == "RD") {
print("Rider: exclude unnecessary files")
sourceSets["main"].kotlin.exclude("**/GitpodForceUpdateMavenProjectsActivity.kt")
sourceSets["main"].kotlin.exclude("**/maven.xml")
}
}

sourceSets {
main {
resources.srcDirs("src/main/resources-${environmentName}")
resources.srcDirs("src/main/resources")
if (properties("platformType") == "RD") {
print("Rider: import rider source set")
resources.srcDirs("src/main/resources-rider")
}
resources.srcDirs("src/main/resources-${environmentName.replace("-rider", "")}")
}
}
}

tasks.named<ProcessResources>("processResources") {
duplicatesStrategy = DuplicatesStrategy.WARN
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems the default value is INHERIT, and if there's no parent it defaults to INCLUDE (ref).

By setting warn, it means we'll take the most recent file.

Is it okay to take the most recent file? What files are we going to skip/ignore by taking the latest?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can try to comment these lines, build complains logo.svg duplicated, which with sourceSet settings, this should no happen. This change is about to fix it

}

// Configure project's dependencies
repositories {
mavenCentral()
Expand Down Expand Up @@ -72,6 +87,20 @@ dependencies {
implementation("io.grpc:grpc-netty-shaded:1.49.0")
}

tasks.withType<KotlinCompile> {
if (properties("platformType") == "RD") {
print("Rider: exclude unnecessary files")
exclude("**/GitpodForceUpdateMavenProjectsActivity.kt")
exclude("**/maven.xml")
}
}

tasks.named("test") {
onlyIf {
properties("platformType") != "RD"
}
}
Comment thread
kylos101 marked this conversation as resolved.

// Configure gradle-intellij-plugin plugin.
// Read more: https://github.com/JetBrains/gradle-intellij-plugin
intellij {
Expand Down
17 changes: 16 additions & 1 deletion components/ide/jetbrains/backend-plugin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,30 @@ project(":") {
kotlin {
val excludedPackage = if (environmentName == "latest") "stable" else "latest"
sourceSets["main"].kotlin.exclude("io/gitpod/jetbrains/remote/${excludedPackage}/**")

if (properties("platformType") == "RD") {
print("Rider: exclude unnecessary files")
sourceSets["main"].kotlin.exclude("**/GitpodForceUpdateMavenProjectsActivity.kt")
sourceSets["main"].kotlin.exclude("**/maven.xml")
}
}

sourceSets {
main {
resources.srcDirs("src/main/resources-${environmentName}")
resources.srcDirs("src/main/resources")
if (properties("platformType") == "RD") {
print("Rider: import rider source set")
resources.srcDirs("src/main/resources-rider")
}
resources.srcDirs("src/main/resources-${environmentName.replace("-rider", "")}")
Comment thread
kylos101 marked this conversation as resolved.
}
}
}

tasks.named<ProcessResources>("processResources") {
duplicatesStrategy = DuplicatesStrategy.WARN
}

// Configure project's dependencies
repositories {
mavenCentral()
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Code generated by gha-update-image/index-jb-platform-update.ts. DO NOT EDIT.
# See https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
# for insight into build numbers and IntelliJ Platform versions.
pluginSinceBuild=242.19533
pluginUntilBuild=242.*
# 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=2024.2
# Version from "com.jetbrains.intellij.idea" which can be found at https://www.jetbrains.com/intellij-repository/snapshots
# platformVersion=242.20224.401
platformVersion=2024.2

platformType=RD
platformBundledPlugins=Git4Idea, org.jetbrains.plugins.terminal, intellij.rider.plugins.cwm
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# this file is auto generated by components/ide/gha-update-image/index-jb.ts
# See https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
# for insight into build numbers and IntelliJ Platform versions.
pluginSinceBuild=241.17890
Comment thread
kylos101 marked this conversation as resolved.
pluginUntilBuild=241.*
# 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=2024.1
# Version from "com.jetbrains.intellij.idea" which can be found at https://www.jetbrains.com/intellij-repository/snapshots
platformVersion=2024.1

platformType=RD
platformBundledPlugins=Git4Idea, org.jetbrains.plugins.terminal, intellij.rider.plugins.cwm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
pluginVersion=0.0.1
gitpodVersion=dev
# Supported environments: stable, latest (via https://github.com/stevesaliman/gradle-properties-plugin)
environmentName=latest
environmentName=stable-rider
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file seems generic.

Should this value be something generic, too...like stable or latest?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In other words, being specific to rider seems odd.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file seems generic.

It's not, we don't use file unless we want to write code for backend-plugin, then we need to follow steps wrote in BUILD.yaml to build proper plugin (latest / stable / latest-rider /stable-rider)

README.md is kind of outdated because of the breaking changes of Intellij Platform Plugin 2.0. I don't plan to update them until all stable IDEs are 2024.2

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it, thank you, @mustard-mh ! 🫶

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Btw, environmentName=xxx will be rewrite when building

# IntelliJ Platform Artifacts Repositories
# -> https://plugins.jetbrains.com/docs/intellij/intellij-artifacts.html
pluginGroup=io.gitpod.jetbrains
Expand Down
Loading