Skip to content

Commit b4c4c3c

Browse files
committed
fix gradle plugin wrong version
1 parent 25738fe commit b4c4c3c

File tree

14 files changed

+58
-40
lines changed

14 files changed

+58
-40
lines changed

buildSrc/src/main/kotlin/software/aws/toolkits/gradle/intellij/IdeVersions.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,11 +173,11 @@ object IdeVersions {
173173
)
174174
),
175175
rider = RiderProfile(
176-
sdkVersion = "2025.2-EAP6-SNAPSHOT",
176+
sdkVersion = "2025.2-EAP8-SNAPSHOT",
177177
bundledPlugins = commonPlugins,
178178
netFrameworkTarget = "net472",
179179
rdGenVersion = "2025.2.2",
180-
nugetVersion = "2025.2.0-eap06"
180+
nugetVersion = "2025.2.0-eap08"
181181
)
182182
)
183183
).associateBy { it.name }

buildSrc/src/main/kotlin/temp-toolkit-intellij-root-conventions.gradle.kts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ plugins {
2323
id("toolkit-publish-root-conventions")
2424
}
2525

26-
toolkitIntelliJ.apply {
27-
val runIdeVariant = providers.gradleProperty("runIdeVariant")
28-
ideFlavor.set(IdeFlavor.values().firstOrNull { it.name == runIdeVariant.orNull } ?: IdeFlavor.IC)
29-
}
26+
//toolkitIntelliJ.apply {
27+
// val runIdeVariant = providers.gradleProperty("runIdeVariant")
28+
// ideFlavor.set(IdeFlavor.values().firstOrNull { it.name == runIdeVariant.orNull } ?: IdeFlavor.IC)
29+
//}
3030

3131
val remoteRobotPort: String by project
3232
val ideProfile = IdeVersions.ideProfile(project)
@@ -66,12 +66,12 @@ tasks.test {
6666
}
6767

6868
dependencies {
69-
intellijPlatform {
70-
val type = toolkitIntelliJ.ideFlavor.map { IntelliJPlatformType.fromCode(it.toString()) }
71-
val version = toolkitIntelliJ.version()
72-
73-
create(type, version, useInstaller = false)
74-
}
69+
// intellijPlatform {
70+
// val type = toolkitIntelliJ.ideFlavor.map { IntelliJPlatformType.fromCode(it.toString()) }
71+
// val version = toolkitIntelliJ.version()
72+
//
73+
// create(type, version, useInstaller = false)
74+
// }
7575

7676
implementation(project(":plugin-toolkit:jetbrains-ultimate"))
7777
project.findProject(":plugin-toolkit:jetbrains-gateway")?.let {

buildSrc/src/main/kotlin/toolkit-intellij-plugin.gradle.kts

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,28 @@
22
// SPDX-License-Identifier: Apache-2.0
33
import org.jetbrains.intellij.platform.gradle.tasks.aware.SandboxAware
44
import software.aws.toolkits.gradle.ciOnly
5+
import software.aws.toolkits.gradle.intellij.IdeFlavor
56
import software.aws.toolkits.gradle.intellij.ToolkitIntelliJExtension
67

7-
project.extensions.create<ToolkitIntelliJExtension>("intellijToolkit")
8+
val intellijToolkit = project.extensions.create("intellijToolkit", ToolkitIntelliJExtension::class)
9+
// TODO: how did this break?
10+
when {
11+
project.name.contains("jetbrains-rider") -> {
12+
intellijToolkit.ideFlavor.set(IdeFlavor.RD)
13+
}
14+
15+
project.name.contains("jetbrains-ultimate") -> {
16+
intellijToolkit.ideFlavor.set(IdeFlavor.IU)
17+
}
18+
19+
project.name.contains("jetbrains-gateway") -> {
20+
intellijToolkit.ideFlavor.set(IdeFlavor.GW)
21+
}
22+
23+
else -> {
24+
intellijToolkit.ideFlavor.set(IdeFlavor.IC)
25+
}
26+
}
827

928
plugins {
1029
id("org.jetbrains.intellij.platform.module")
@@ -14,12 +33,6 @@ intellijPlatform {
1433
instrumentCode = false
1534
}
1635

17-
dependencies {
18-
intellijPlatform {
19-
instrumentationTools()
20-
}
21-
}
22-
2336
// CI keeps running out of RAM, so limit IDE instance count to 4
2437
ciOnly {
2538
abstract class NoopBuildService : BuildService<BuildServiceParameters.None> {}

buildSrc/src/main/kotlin/toolkit-intellij-subplugin.gradle.kts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,12 +87,11 @@ intellijPlatform {
8787

8888
dependencies {
8989
intellijPlatform {
90-
instrumentationTools()
90+
val version = toolkitIntelliJ.version()
9191

9292
// annoying resolution issue that we don't want to bother fixing
9393
if (!project.name.contains("jetbrains-gateway")) {
9494
val type = toolkitIntelliJ.ideFlavor.map { IntelliJPlatformType.fromCode(it.toString()) }
95-
val version = toolkitIntelliJ.version()
9695

9796
create(type, version, useInstaller = false)
9897
}

buildSrc/src/main/kotlin/toolkit-jvm-conventions.gradle.kts

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22
// SPDX-License-Identifier: Apache-2.0
33

44
import org.gradle.kotlin.dsl.kotlin
5-
import org.gradle.kotlin.dsl.withType
6-
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
5+
import org.jetbrains.kotlin.gradle.dsl.JvmDefaultMode
6+
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
7+
import org.jetbrains.kotlin.gradle.dsl.KotlinVersion
78
import software.aws.toolkits.gradle.jvmTarget
89
import software.aws.toolkits.gradle.kotlinTarget
910

@@ -18,11 +19,11 @@ java {
1819
targetCompatibility = javaVersion
1920
}
2021

21-
tasks.withType<KotlinCompile>().configureEach {
22-
kotlinOptions {
23-
jvmTarget = javaVersion.majorVersion
24-
apiVersion = project.kotlinTarget().get()
25-
languageVersion = project.kotlinTarget().get()
26-
freeCompilerArgs = listOf("-Xjvm-default=all")
22+
kotlin {
23+
compilerOptions {
24+
jvmTarget = JvmTarget.fromTarget("21")
25+
languageVersion = KotlinVersion.fromVersion(project.kotlinTarget().get())
26+
apiVersion = KotlinVersion.fromVersion(project.kotlinTarget().get())
27+
jvmDefault.set(JvmDefaultMode.NO_COMPATIBILITY)
2728
}
2829
}

buildSrc/src/main/kotlin/toolkit-kotlin-conventions.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ dependencies {
1919
// - The dependency on the Kotlin Standard Library (stdlib) is automatically added when using the Gradle Kotlin plugin and may conflict with the version provided with the IntelliJ Platform, see: https://jb.gg/intellij-platform-kotlin-stdlib
2020
//- The Kotlin Coroutines library should not be added explicitly to the project as it is already provided with the IntelliJ Platform.
2121
implementation(versionCatalog.findBundle("kotlin").get())
22-
implementation(versionCatalog.findLibrary("kotlin-coroutines").get())
22+
// implementation(versionCatalog.findLibrary("kotlin-coroutines").get())
2323

2424
testFixturesApi(versionCatalog.findLibrary("kotlin-test").get())
2525
testFixturesApi(versionCatalog.findLibrary("kotlin-coroutinesDebug").get()) {

gradle.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ toolkitVersion=3.87-SNAPSHOT
88
publishToken=
99
publishChannel=
1010

11-
ideProfileName=2025.1
11+
ideProfileName=2025.2
1212

1313
remoteRobotPort=8080
1414

@@ -19,7 +19,7 @@ kotlin.code.style=official
1919
org.gradle.parallel=true
2020
org.gradle.caching=true
2121
org.gradle.jvmargs=-Xmx4g
22-
kotlin.daemon.jvmargs=-Xmx1500m -Xms500m
22+
kotlin.daemon.jvmargs=-Xmx2000m -Xms500m
2323

2424
# prefer non-enterprise variant of test-retry
2525
systemProp.develocity.testretry.enabled=false

gradle/libs.versions.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ junit4 = "4.13.2"
1919
junit5 = "5.11.0"
2020
# https://plugins.jetbrains.com/docs/intellij/kotlin.html#adding-kotlin-support
2121
# https://kotlinlang.org/docs/releases.html#release-details
22-
kotlin = "2.1.20"
22+
kotlin = "2.2.0"
2323
# set in <root>/settings.gradle.kts
24-
kotlinCoroutines = "1.8.0"
24+
kotlinCoroutines = "1.10.1"
2525
lsp4j = "0.24.0"
2626
mockito = "5.12.0"
2727
mockitoKotlin = "5.4.1-SNAPSHOT"

kotlinResolution.settings.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ dependencyResolutionManagement {
1515
}
1616

1717
"2025.2" -> {
18-
"1.10.1-intellij-4"
18+
"1.10.1-intellij-5"
1919
}
2020

2121
else -> { error("not set") }

plugins/amazonq/chat/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonqDoc/controller/DocController.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ import com.intellij.openapi.vfs.VfsUtil
1919
import com.intellij.openapi.wm.ToolWindowManager
2020
import com.intellij.testFramework.LightVirtualFile
2121
import kotlinx.coroutines.withContext
22-
import org.intellij.images.fileTypes.impl.SvgFileType
2322
import software.amazon.awssdk.services.codewhispererruntime.model.DocFolderLevel
2423
import software.amazon.awssdk.services.codewhispererruntime.model.DocInteractionType
2524
import software.amazon.awssdk.services.codewhispererruntime.model.DocUserDecision
@@ -400,7 +399,7 @@ class DocController(
400399
// instead of diff display generated svg in edit/preview window
401400
val inMemoryFile = LightVirtualFile(
402401
message.filePath,
403-
SvgFileType.INSTANCE,
402+
null,
404403
newFileContent
405404
)
406405
inMemoryFile.isWritable = false

0 commit comments

Comments
 (0)