Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
c468e85
chore(repo): migrate intellij to nx gradle plugin v2
MaxKless Aug 22, 2025
3fc9c02
dont call projectReportAll in CI
MaxKless Aug 22, 2025
2b12fb4
review comment
MaxKless Aug 22, 2025
6f623bc
add storage logging
MaxKless Aug 25, 2025
9d3dccd
no before/after
MaxKless Aug 25, 2025
ca62349
add cleanup
MaxKless Aug 25, 2025
2884725
lmao lets see if this works
MaxKless Aug 25, 2025
68f7552
gradle wrapper
MaxKless Aug 25, 2025
f95a979
make ci yaml normal again
MaxKless Aug 25, 2025
f9efd85
move formatting
MaxKless Aug 25, 2025
050c716
do not free space for everything
MaxKless Aug 25, 2025
62c38e0
run projectReport on java agents
MaxKless Aug 26, 2025
cafc67c
bump to 0.1.6
MaxKless Aug 28, 2025
114ad9f
back to 0.1.5
MaxKless Aug 28, 2025
f0c7f98
try again
MaxKless Aug 28, 2025
99b5fb9
parallelism: 1
MaxKless Aug 28, 2025
8d99623
no extra runner
MaxKless Aug 28, 2025
73dc7b3
no plugin timeouts
MaxKless Aug 28, 2025
41e75b8
add more logs to gradle plugin
MaxKless Aug 29, 2025
f41fdd7
formatting
MaxKless Aug 29, 2025
c146b69
migrate to 0.1.7
MaxKless Sep 8, 2025
8d699ee
lil bit more space
MaxKless Sep 9, 2025
b584de0
add more logging
MaxKless Sep 9, 2025
97f014d
chore(repo): simplify agents.yaml
lourw Sep 11, 2025
13b53cc
chore(repo): remove patches
lourw Sep 11, 2025
a9dcdde
Update distribution config for changeset sizes
lourw Sep 17, 2025
112f3dd
Remove Gradlew Wrapper step from agents.yaml
lourw Sep 18, 2025
0bcbc26
chore(repo): update tasks
lourw Sep 18, 2025
26be2a3
chore(repo): remove build
lourw Sep 18, 2025
2d658a6
chore(repo): move gradle home
lourw Sep 18, 2025
cf5723b
chore(repo): update gradle deps step
lourw Sep 18, 2025
3d33b2a
chore(repo): fix agents
lourw Sep 18, 2025
34a38fb
chore(gradle): bump plugin
lourw Sep 18, 2025
70f9628
chore(gradle): bump plugin version
lourw Sep 18, 2025
3920296
chore(repo): fix agents
lourw Sep 18, 2025
4a2103d
Apply suggestions from code review
lourw Sep 18, 2025
9f4b3f9
chore(repo): ci fixes
lourw Sep 18, 2025
5ebe29b
chore(repo): reorganize gradle
lourw Sep 19, 2025
9a61782
chore(gradle): exclude path
lourw Sep 19, 2025
2345fab
chore(gradle): remove intellij from models
lourw Sep 19, 2025
5efca28
chore(gradle): simplify more
lourw Sep 19, 2025
732c46f
chore(gradle): ignore paths
lourw Sep 19, 2025
935b976
build with 2025.2.2
MaxKless Sep 23, 2025
c35c5fc
format & buildPlugin in CI
MaxKless Sep 23, 2025
ed930bc
chore(repo): add semver4j
lourw Sep 23, 2025
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
20 changes: 8 additions & 12 deletions .github/workflows/ci_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ env:
JAVA_VERSION: 21
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_READ_WRITE_TOKEN }}
NX_CLOUD_NO_TIMEOUTS: true
NX_PLUGIN_NO_TIMEOUTS: true

jobs:
main-linux:
Expand Down Expand Up @@ -61,18 +62,13 @@ jobs:
- name: Install NPM dependencies
run: yarn install --immutable

# We intentionally put the gradle tasks first because their artifacts are needed for project graph construction
# and we do not want to give the false impression that the artifact download time is part of nx commands.
- name: Gradle artifacts and formatting
run: |
yarn nx-cloud record -- ./gradlew projectReportAll
yarn nx-cloud record -- ./gradlew :intellij:ktfmtCheck --info

- name: Check project graph creation
run: yarn nx show projects --verbose
- name: Setup Gradle Dependencies
run: ./gradlew dependencies

- name: Check formatting of other files
run: yarn nx-cloud record -- yarn nx format:check --verbose
- name: Check formatting
run: |
yarn nx-cloud record -- yarn nx format:check --verbose
yarn nx-cloud record -- yarn nx run-many -t ktfmtFormat

- name: Ensure the workspace configuration is in sync
run: yarn nx-cloud record -- yarn nx sync:check
Expand All @@ -82,7 +78,7 @@ jobs:

# todo(cammisuli): disable verifyPlugin for now as its constantly failing on CI
# - run: yarn nx affected --targets=lint,test,build,e2e-ci,typecheck,verifyPlugin,telemetry-check --configuration=ci --exclude=nx-console --parallel=3
- run: yarn nx affected --targets=lint,test,build,e2e-ci,typecheck,telemetry-check --configuration=ci --exclude=nx-console --parallel=3
- run: yarn nx affected --targets=lint,test,build,e2e-ci,typecheck,telemetry-check,buildPlugin --configuration=ci --exclude=nx-console --parallel=3
timeout-minutes: 60

- run: npx nx-cloud fix-ci
Expand Down
114 changes: 51 additions & 63 deletions .nx/workflows/agents.yaml
Original file line number Diff line number Diff line change
@@ -1,36 +1,10 @@
launch-templates:
windows-medium-js:
resource-class: 'windows/medium'
image: 'windows-2022'
init-steps:
- name: Checkout
uses: 'nrwl/nx-cloud-workflows/v4/workflow-steps/checkout/main.yaml'
- name: Restore Node Modules Cache
uses: 'nrwl/nx-cloud-workflows/v4/workflow-steps/cache/main.yaml'
inputs:
key: 'package-lock.json|yarn.lock|pnpm-lock.yaml'
paths: 'node_modules'
base-branch: 'main'
- name: Restore Browser Binary Cache
uses: 'nrwl/nx-cloud-workflows/v4/workflow-steps/cache/main.yaml'
inputs:
key: 'package-lock.json|yarn.lock|pnpm-lock.yaml|"browsers"'
paths: |
'../.cache/Cypress'
'../.cache/ms-playwright'
base-branch: 'main'
- name: Install Node Modules
uses: 'nrwl/nx-cloud-workflows/v4/workflow-steps/install-node-modules/main.yaml'
- name: Install Browsers (if needed)
uses: 'nrwl/nx-cloud-workflows/v4/workflow-steps/install-browsers/main.yaml'
- name: Install cypress with --force
script: npx cypress install --force
linux-medium-plus-js:
resource-class: 'docker_linux_amd64/medium+'
image: 'ubuntu22.04-node20.11-v10'
init-steps:
- name: Checkout
uses: 'nrwl/nx-cloud-workflows/v4/workflow-steps/checkout/main.yaml'
common-env: &common-env
NX_VERBOSE_LOGGING: true
common-init-steps: &common-init-steps
- name: Checkout
uses: 'nrwl/nx-cloud-workflows/v4/workflow-steps/checkout/main.yaml'
- group-name: Restore Caches
steps:
- name: Setup Java 21
script: |
sudo apt update
Expand All @@ -50,36 +24,50 @@ launch-templates:
paths: |
'../.cache/Cypress'
base-branch: 'main'
- group-name: Install Dependencies
parallel: true
steps:
- name: Install Node Modules
uses: 'nrwl/nx-cloud-workflows/v4/workflow-steps/install-node-modules/main.yaml'
- name: Install Browsers (if needed)
uses: 'nrwl/nx-cloud-workflows/v4/workflow-steps/install-browsers/main.yaml'
linux-large-js:
resource-class: 'docker_linux_amd64/large'
- name: Generate workspace data
script: npx nx show projects
- name: Install Browsers
uses: 'nrwl/nx-cloud-workflows/v4/workflow-steps/install-browsers/main.yaml'

launch-templates:
linux-medium-plus-js:
resource-class: 'docker_linux_amd64/medium+'
image: 'ubuntu22.04-node20.11-v10'
init-steps:
- name: Checkout
uses: 'nrwl/nx-cloud-workflows/v4/workflow-steps/checkout/main.yaml'
- name: Setup Java 21
script: |
sudo apt update
sudo apt install -y openjdk-21-jdk
sudo update-alternatives --set java /usr/lib/jvm/java-21-openjdk-amd64/bin/java
java -version
- name: Restore Node Modules Cache
uses: 'nrwl/nx-cloud-workflows/v4/workflow-steps/cache/main.yaml'
inputs:
key: 'package-lock.json|yarn.lock|pnpm-lock.yaml'
paths: 'node_modules'
base-branch: 'main'
- name: Restore Browser Binary Cache
uses: 'nrwl/nx-cloud-workflows/v4/workflow-steps/cache/main.yaml'
inputs:
key: 'package-lock.json|yarn.lock|pnpm-lock.yaml|"browsers"'
paths: |
'../.cache/Cypress'
base-branch: 'main'
- name: Install Node Modules
uses: 'nrwl/nx-cloud-workflows/v4/workflow-steps/install-node-modules/main.yaml'
- name: Install Browsers (if needed)
uses: 'nrwl/nx-cloud-workflows/v4/workflow-steps/install-browsers/main.yaml'
env: *common-env
init-steps: *common-init-steps
linux-large-plus-js:
resource-class: 'docker_linux_amd64/large+'
image: 'ubuntu22.04-node20.11-v10'
env: *common-env
init-steps: *common-init-steps
# windows-medium-js:
# resource-class: 'windows/medium'
# image: 'windows-2022'
# init-steps:
# - name: Checkout
# uses: 'nrwl/nx-cloud-workflows/v4/workflow-steps/checkout/main.yaml'
# - name: Restore Node Modules Cache
# uses: 'nrwl/nx-cloud-workflows/v4/workflow-steps/cache/main.yaml'
# inputs:
# key: 'package-lock.json|yarn.lock|pnpm-lock.yaml'
# paths: 'node_modules'
# base-branch: 'main'
# - name: Restore Browser Binary Cache
# uses: 'nrwl/nx-cloud-workflows/v4/workflow-steps/cache/main.yaml'
# inputs:
# key: 'package-lock.json|yarn.lock|pnpm-lock.yaml|"browsers"'
# paths: |
# '../.cache/Cypress'
# '../.cache/ms-playwright'
# base-branch: 'main'
# - name: Install Node Modules
# uses: 'nrwl/nx-cloud-workflows/v4/workflow-steps/install-node-modules/main.yaml'
# - name: Install Browsers (if needed)
# uses: 'nrwl/nx-cloud-workflows/v4/workflow-steps/install-browsers/main.yaml'
# - name: Install cypress with --force
# script: npx cypress install --force
13 changes: 7 additions & 6 deletions .nx/workflows/linux-distribution-config.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
distribute-on:
small-changeset: 2 linux-medium-plus-js, 1 linux-large-js
medium-changeset: 3 linux-medium-plus-js, 1 linux-large-js
large-changeset: 5 linux-medium-plus-js, 1 linux-large-js
small-changeset: 3 linux-large-plus-js
medium-changeset: 4 linux-large-plus-js
large-changeset: 6 linux-large-plus-js

assignment-rules:
- project: intellij
target: build
- projects:
- intellij
runs-on:
- linux-large-js
- linux-large-plus-js
parallelism: 1
46 changes: 10 additions & 36 deletions apps/intellij/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,51 +7,22 @@ fun isWindows(): Boolean {
return System.getProperty("os.name").lowercase().startsWith("windows")
}

val nxlsRoot = "${rootDir}/../../dist/apps/nxls"
val nxlsRoot = "${rootDir}/dist/apps/nxls"

layout.buildDirectory = file("${rootDir}/../../dist/apps/intellij")
layout.buildDirectory = file("${rootDir}/dist/apps/intellij")

plugins {
// Java support
id("java")
// Kotlin support
id("org.jetbrains.kotlin.jvm") version "2.2.0"
// Kotlin serialization
id("org.jetbrains.kotlin.plugin.serialization") version "2.2.0"
// Gradle IntelliJ Platform Plugin
id("org.jetbrains.intellij.platform") version "2.9.0"

// Gradle Changelog Plugin
id("org.jetbrains.changelog") version "2.4.0"

id("com.ncorti.ktfmt.gradle") version "0.24.0"
id("org.jetbrains.intellij.platform") version "2.9.0"
}

group = providers.gradleProperty("pluginGroup").get()

version = providers.gradleProperty("version").get()

// Configure project's dependencies
repositories {
mavenCentral()

intellijPlatform { defaultRepositories() }
}

allprojects {
apply {
plugin("project-report")
plugin("com.ncorti.ktfmt.gradle")
}
}

tasks.register("projectReportAll") {
// All project reports of subprojects
allprojects.forEach { dependsOn(it.tasks.get("projectReport")) }

// All projectReportAll of included builds
gradle.includedBuilds.forEach { dependsOn(it.task(":projectReportAll")) }
}
repositories { intellijPlatform { defaultRepositories() } }

configurations.all {
exclude("org.slf4j", "slf4j-api")
Expand All @@ -77,8 +48,11 @@ dependencies {
testImplementation("junit:junit:4.13.2")

intellijPlatform {
intellijIdeaUltimate(providers.gradleProperty("platformVersion"))
plugin("com.intellij.ml.llm:252.25557.171")
val type = providers.gradleProperty("platformType")
val version = providers.gradleProperty("platformVersion")
create(type, version) { useCache = true }

plugin("com.intellij.ml.llm:252.26199.169")
bundledPlugins(
providers.gradleProperty("platformPlugins").map { plugins ->
plugins.split(',').map(String::trim).filter(String::isNotEmpty)
Expand All @@ -89,7 +63,7 @@ dependencies {
// Add test framework configuration
testFramework(org.jetbrains.intellij.platform.gradle.TestFrameworkType.Platform)
}
implementation(project(":libs:intellij:models"))
implementation(project(":intellij-models"))
}

ktfmt { kotlinLangStyle() }
Expand Down
31 changes: 4 additions & 27 deletions apps/intellij/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,34 +3,11 @@
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"projectType": "application",
"targets": {
"build": {
"command": "yarn nx run intellij:buildPlugin",
"configurations": {
"production-intellij": {}
},
"dependsOn": ["^build"]
},
"runIde": {
"dependsOn": ["^build"]
},
"verifyPlugin": {
"cache": true
},
"ktfmtFormat": {
"//": "TODO: remove this after gradle refactor, probably fixed with different build setup",
"cache": false
},
"test": {
"command": "yarn nx run intellij:check"
},
"lint": {
"executor": "nx:noop"
},
"x-lint": {
"//": "Run inspections take a long time on the CI. Disable for now",
"executor": "nx:run-commands",
"composedJar": {
"executor": "@nx/gradle:gradle",
"options": {
"command": "node ./apps/intellij/run-gradle.js :apps:intellij:runInspections"
"taskName": ":intellij:composedJar",
"excludeDependsOn": false
}
},
"semantic-release": {
Expand Down
4 changes: 2 additions & 2 deletions apps/intellij/settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
rootProject.name = "intellij-app"

include("libs:intellij:models")
include("intellij-models")

project(":libs:intellij:models").projectDir = file("../../libs/intellij/models")
project(":intellij-models").projectDir = file("../../libs/intellij/models")
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@ class FixCIPEService(private val project: Project, private val cs: CoroutineScop
.createChatSession(
ChatCreationContext(
origin = ChatOrigin.CustomIntention,
sourceActionForStatistic = ChatSessionStorage.SourceAction.NEW_CHAT,
null,
sourceActionForStatistic = ChatSourceAction.NEW_CHAT,
)
)
chatSession.setActiveMode(ChatSessionMode.CODE_GENERATION)
Expand Down
48 changes: 24 additions & 24 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,32 @@ group = "dev.nx.console"

layout.buildDirectory = File("dist")

allprojects { apply { plugin("project-report") } }
plugins {
id("dev.nx.gradle.project-graph") version "0.1.8"
id("com.ncorti.ktfmt.gradle") version "0.24.0"

tasks {
register("projectReportAll") {
// All project reports of subprojects
allprojects.forEach { dependsOn(it.tasks.get("projectReport")) }
id("org.jetbrains.kotlin.jvm") version "2.2.0"
id("org.jetbrains.kotlin.plugin.serialization") version "2.2.0"
}

// All projectReportAll of included builds
gradle.includedBuilds.forEach { dependsOn(it.task(":projectReportAll")) }
}
register<DefaultTask>("publish") {
group = "publish"
description = "Placeholder task to workaround the semantic-release plugin"
}
allprojects {
repositories {
mavenLocal()
mavenCentral()
gradlePluginPortal()
}

register("clean") {
description = "Cleans all included builds"
dependsOn(gradle.includedBuilds.map { it.task(":clean") })
doLast { println("Cleaned ${gradle.includedBuilds.size} included builds") }
}
apply {
plugin("dev.nx.gradle.project-graph")
plugin("com.ncorti.ktfmt.gradle")
plugin("org.jetbrains.kotlin.jvm")
plugin("org.jetbrains.kotlin.plugin.serialization")
}
}

register("testClasses") {
description = "Compiles test classes for all included builds"
dependsOn(gradle.includedBuilds.map { it.task(":testClasses") })
doLast {
println("Compiled test classes for ${gradle.includedBuilds.size} included builds")
}
}
tasks {
register<DefaultTask>("publish") {
group = "publish"
description = "Placeholder task to workaround the semantic-release plugin"
}
}
3 changes: 2 additions & 1 deletion apps/intellij/gradle.properties → gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ version=0.0.1
# Supported build number ranges and IntelliJ Platform versions -> https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
pluginSinceBuild=252
# IntelliJ Platform Properties -> https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html#configuration-intellij-extension
platformVersion=2025.2.1
platformType=IU
platformVersion=2025.2.2
# Plugin Dependencies -> https://plugins.jetbrains.com/docs/intellij/plugin-dependencies.html
# Example: platformPlugins = com.intellij.java, com.jetbrains.php:203.4449.22
platformPlugins=JavaScript, org.jetbrains.plugins.terminal, AngularJS, com.intellij.modules.json, Git4Idea
Expand Down
Loading