Skip to content

Commit cc4e79a

Browse files
authored
Update to Rider 2026.1 (#312)
* chore: update Rider SDK to 2026.1 * chore: update Kotlin to 2.3.20 and rd-gen to 2026.1.3 * chore: update IntelliJ Platform plugin to 2.13.1 and Gradle to 8.13 * chore: update Gradle wrapper to 9.4.1 and fix Gradle 9 compatibility IntelliJ Platform Gradle Plugin 2.13.1 requires Gradle 9.0+. Replace removed exec {} in task actions with injected ExecOperations. Replace deprecated buildDir with layout.buildDirectory. * chore: update ReSharper SDK to 2026.1.0 * chore: update Microsoft.CodeAnalysis.NetAnalyzers to 10.0.104 * chore: update CI .NET SDK from 6.x to 8.x .NET 6 is EOL. Update to .NET 8 LTS for building with ReSharper SDK 2026.1. * fix: add Gradle 9 toolchain resolver and update rd-gen imports Add foojay-resolver-convention plugin for JDK auto-provisioning. Update rd-gen model imports from com.jetbrains.rider.generator.nova to com.jetbrains.rd.generator.nova (renamed in rd-gen 2026.1.3). * chore: improve CI pipeline - Rename workflow to 'Build & Publish' - Add concurrency group to cancel superseded runs - Fix cache key to use correct path for gradle-wrapper.properties and include libs.versions.toml and build.gradle.kts - Add restore-keys fallback for partial cache hits - Update upload-artifact from v4.3.3 to v4 - Remove unnecessary cmd shell from publish step * chore: use gradle/actions/setup-gradle for better caching Replace manual Gradle cache with official setup-gradle action which handles wrapper, dependency, and build cache automatically. Add --build-cache flag to reuse task outputs across runs. Keep separate NuGet cache since setup-gradle doesn't cover that. * chore: pin gradle/actions/setup-gradle to full commit SHA * fix: pass publish secret via env var instead of inline expansion Avoids expanding secrets directly in run blocks (githubactions:S7636).
1 parent a3c31bd commit cc4e79a

13 files changed

Lines changed: 89 additions & 63 deletions

File tree

.github/workflows/main.yml

Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Create
1+
name: Build & Publish
22

33
on:
44
push:
@@ -8,6 +8,10 @@ on:
88
branches:
99
- master
1010

11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.ref }}
13+
cancel-in-progress: true
14+
1115
jobs:
1216
build:
1317
runs-on: windows-latest
@@ -16,33 +20,34 @@ jobs:
1620
- name: Checkout
1721
uses: actions/checkout@v4
1822

19-
- name: Install .NET 6 SDK
23+
- name: Install .NET SDK
2024
uses: actions/setup-dotnet@v4
2125
with:
22-
dotnet-version: '6.x'
26+
dotnet-version: '8.x'
27+
28+
- name: Setup Gradle
29+
uses: gradle/actions/setup-gradle@0b6dd653ba04f4f93bf581ec31e66cbd7dcb644d # v4
2330

24-
- uses: actions/cache@v4
31+
- name: Cache NuGet packages
32+
uses: actions/cache@v4
2533
with:
26-
path: |
27-
build/gradle-jvm
28-
~/.nuget/packages
29-
~/.gradle/caches
30-
~/.gradle/wrapper
31-
key: ${{ runner.os }}-Build-${{ hashFiles('gradlew.bat', 'src/dotnet/*/*.csproj', 'src/dotnet/*.props', 'gradle-wrapper.properties') }}
34+
path: ~/.nuget/packages
35+
key: ${{ runner.os }}-nuget-${{ hashFiles('src/dotnet/*/*.csproj', 'src/dotnet/*.props') }}
36+
restore-keys: |
37+
${{ runner.os }}-nuget-
3238
3339
- name: Build Plugin
34-
run: ./gradlew buildPlugin
40+
run: ./gradlew buildPlugin --build-cache
3541

3642
- name: Publish Artifact
37-
uses: actions/upload-artifact@v4.3.3
43+
uses: actions/upload-artifact@v4
3844
with:
3945
name: Artifacts
4046
path: output
4147
retention-days: 7
42-
48+
4349
- name: Publish plugins to jetbrains
44-
shell: cmd
45-
run: ./gradlew publishPlugin -PBuildConfiguration="Release" -PPublishToken="%PublishKey%"
50+
run: ./gradlew publishPlugin -PBuildConfiguration="Release" -PPublishToken="$PUBLISH_KEY" --build-cache
4651
env:
47-
PublishKey: ${{ secrets.PublishKey }}
48-
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/master'
52+
PUBLISH_KEY: ${{ secrets.PublishKey }}
53+
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/master'

build.gradle.kts

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,27 @@
11
import com.jetbrains.plugin.structure.base.utils.isFile
22
import groovy.ant.FileNameFinder
33
import org.apache.tools.ant.taskdefs.condition.Os
4+
import org.gradle.process.ExecOperations
45
import org.jetbrains.intellij.platform.gradle.Constants
56
import java.io.ByteArrayOutputStream
7+
import javax.inject.Inject
68

79
plugins {
810
id("java")
911
alias(libs.plugins.kotlinJvm)
10-
id("org.jetbrains.intellij.platform") version "2.8.0" // See https://github.com/JetBrains/intellij-platform-gradle-plugin/releases
12+
id("org.jetbrains.intellij.platform") version "2.13.1" // See https://github.com/JetBrains/intellij-platform-gradle-plugin/releases
1113
id("me.filippov.gradle.jvm.wrapper") version "0.15.0"
1214
}
1315

1416
val isWindows = Os.isFamily(Os.FAMILY_WINDOWS)
1517
extra["isWindows"] = isWindows
1618

19+
// Gradle 9 removed exec {} from task actions; use injected ExecOperations instead
20+
interface Injected {
21+
@get:Inject val execOps: ExecOperations
22+
}
23+
val injected = objects.newInstance<Injected>()
24+
1725
val DotnetSolution: String by project
1826
val BuildConfiguration: String by project
1927
val ProductVersion: String by project
@@ -35,7 +43,7 @@ repositories {
3543
}
3644

3745
tasks.wrapper {
38-
gradleVersion = "8.8"
46+
gradleVersion = "9.4.1"
3947
distributionType = Wrapper.DistributionType.ALL
4048
distributionUrl = "https://cache-redirector.jetbrains.com/services.gradle.org/distributions/gradle-${gradleVersion}-all.zip"
4149
}
@@ -73,7 +81,7 @@ val setBuildTool by tasks.registering {
7381

7482
if (isWindows) {
7583
val stdout = ByteArrayOutputStream()
76-
exec {
84+
injected.execOps.exec {
7785
executable("${rootDir}\\tools\\vswhere.exe")
7886
args("-latest", "-property", "installationPath", "-products", "*")
7987
standardOutput = stdout
@@ -102,7 +110,7 @@ val compileDotNet by tasks.registering {
102110
val arguments = (setBuildTool.get().extra["args"] as List<String>).toMutableList()
103111
arguments.add("/t:Restore;Rebuild")
104112

105-
exec {
113+
injected.execOps.exec {
106114
executable(executable)
107115
args(arguments)
108116
workingDir(rootDir)
@@ -112,7 +120,7 @@ val compileDotNet by tasks.registering {
112120

113121
val testDotNet by tasks.registering {
114122
doLast {
115-
exec {
123+
injected.execOps.exec {
116124
executable("dotnet")
117125
args("test", DotnetSolution,"--logger","GitHubActions")
118126
workingDir(rootDir)
@@ -123,7 +131,7 @@ val testDotNet by tasks.registering {
123131
tasks.buildPlugin {
124132
doLast {
125133
copy {
126-
from("${buildDir}/distributions/${rootProject.name}-${version}.zip")
134+
from("${layout.buildDirectory.get().asFile}/distributions/${rootProject.name}-${version}.zip")
127135
into("${rootDir}/output")
128136
}
129137

@@ -141,7 +149,7 @@ tasks.buildPlugin {
141149
arguments.add("/p:PackageReleaseNotes=${changeNotes}")
142150
arguments.add("/p:PackageVersion=${version}")
143151

144-
exec {
152+
injected.execOps.exec {
145153
executable(executable)
146154
args(arguments)
147155
workingDir(rootDir)
@@ -207,7 +215,7 @@ tasks.publishPlugin {
207215
token.set(PublishToken)
208216

209217
doLast {
210-
exec {
218+
injected.execOps.exec {
211219
executable("dotnet")
212220
args("nuget","push","output/${DotnetPluginId}.${version}.nupkg","--api-key", PublishToken,"--source","https://plugins.jetbrains.com")
213221
workingDir(rootDir)

gradle.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ PublishToken="_PLACEHOLDER_"
1515
# Release: 2020.2
1616
# EAP: 2020.3-EAP2-SNAPSHOT
1717
# Nightly: 2020.3-SNAPSHOT
18-
ProductVersion=2025.3
19-
PluginVersion=2025.3.0
18+
ProductVersion=2026.1
19+
PluginVersion=2026.1.0
2020

2121
# Kotlin 1.4 will bundle the stdlib dependency by default, causing problems with the version bundled with the IDE
2222
# https://blog.jetbrains.com/kotlin/2020/07/kotlin-1-4-rc-released/#stdlib-default

gradle/libs.versions.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[versions]
2-
kotlin = "2.2.21" # https://plugins.jetbrains.com/docs/intellij/using-kotlin.html#kotlin-standard-library
3-
rdGen = "2025.3.1" # https://github.com/JetBrains/rd/releases
2+
kotlin = "2.3.20" # https://plugins.jetbrains.com/docs/intellij/using-kotlin.html#kotlin-standard-library
3+
rdGen = "2026.1.3" # https://github.com/JetBrains/rd/releases
44

55
[libraries]
66
kotlinStdLib = { group = "org.jetbrains.kotlin", name = "kotlin-stdlib", version.ref = "kotlin" }

gradle/wrapper/gradle-wrapper.jar

5.38 KB
Binary file not shown.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://cache-redirector.jetbrains.com/services.gradle.org/distributions/gradle-8.8-all.zip
3+
distributionUrl=https\://cache-redirector.jetbrains.com/services.gradle.org/distributions/gradle-9.4.1-all.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME
7-
zipStorePath=wrapper/dists
7+
zipStorePath=wrapper/dists

gradlew

100644100755
Lines changed: 21 additions & 22 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gradlew.bat

Lines changed: 15 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

protocol/src/main/kotlin/model/rider/CleanCodeModel.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package model.rider
22

33
import com.jetbrains.rider.model.nova.ide.SolutionModel
4-
import com.jetbrains.rider.generator.nova.*
5-
import com.jetbrains.rider.generator.nova.PredefinedType.*
4+
import com.jetbrains.rd.generator.nova.*
5+
import com.jetbrains.rd.generator.nova.PredefinedType.*
66

77
@Suppress("unused")
88
object CleanCodeModel : Ext(SolutionModel.Solution) {

settings.gradle

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ pluginManagement {
1717
}
1818
}
1919

20+
plugins {
21+
id("org.gradle.toolchains.foojay-resolver-convention") version "1.0.0"
22+
}
23+
2024
rootProject.name = "cleancode"
2125

2226
include(":protocol")

0 commit comments

Comments
 (0)