diff --git a/.changes/next-release/feature-041cb8b2-7ea9-4422-9f93-7c18bcf6b111.json b/.changes/next-release/feature-041cb8b2-7ea9-4422-9f93-7c18bcf6b111.json new file mode 100644 index 00000000000..1646cc84206 --- /dev/null +++ b/.changes/next-release/feature-041cb8b2-7ea9-4422-9f93-7c18bcf6b111.json @@ -0,0 +1,4 @@ +{ + "type" : "feature", + "description" : "Add support for 2025.2" +} \ No newline at end of file diff --git a/.run/Run AWS Toolkit - Community [2025.2].run.xml b/.run/Run AWS Toolkit - Community [2025.2].run.xml new file mode 100644 index 00000000000..febe6f4501b --- /dev/null +++ b/.run/Run AWS Toolkit - Community [2025.2].run.xml @@ -0,0 +1,25 @@ + + + + + + + + false + true + false + false + + + \ No newline at end of file diff --git a/.run/Run AWS Toolkit - Gateway [2025.2].run.xml b/.run/Run AWS Toolkit - Gateway [2025.2].run.xml new file mode 100644 index 00000000000..173f374a06b --- /dev/null +++ b/.run/Run AWS Toolkit - Gateway [2025.2].run.xml @@ -0,0 +1,25 @@ + + + + + + + + false + true + false + false + + + \ No newline at end of file diff --git a/.run/Run AWS Toolkit - Rider [2025.2].run.xml b/.run/Run AWS Toolkit - Rider [2025.2].run.xml new file mode 100644 index 00000000000..aeecdf59850 --- /dev/null +++ b/.run/Run AWS Toolkit - Rider [2025.2].run.xml @@ -0,0 +1,25 @@ + + + + + + + + false + true + false + false + + + \ No newline at end of file diff --git a/.run/Run AWS Toolkit - Ultimate [2025.2].run.xml b/.run/Run AWS Toolkit - Ultimate [2025.2].run.xml new file mode 100644 index 00000000000..c65b8d857f8 --- /dev/null +++ b/.run/Run AWS Toolkit - Ultimate [2025.2].run.xml @@ -0,0 +1,25 @@ + + + + + + + + false + true + false + false + + + \ No newline at end of file diff --git a/.run/Run All - Community [2025.2].run.xml b/.run/Run All - Community [2025.2].run.xml new file mode 100644 index 00000000000..baa08804312 --- /dev/null +++ b/.run/Run All - Community [2025.2].run.xml @@ -0,0 +1,25 @@ + + + + + + + + false + true + false + false + + + \ No newline at end of file diff --git a/.run/Run All - Rider [2025.2].run.xml b/.run/Run All - Rider [2025.2].run.xml new file mode 100644 index 00000000000..dfbf6e33121 --- /dev/null +++ b/.run/Run All - Rider [2025.2].run.xml @@ -0,0 +1,25 @@ + + + + + + + + false + true + false + false + + + \ No newline at end of file diff --git a/.run/Run All - Ultimate [2025.2].run.xml b/.run/Run All - Ultimate [2025.2].run.xml new file mode 100644 index 00000000000..4dbdd4dc4e0 --- /dev/null +++ b/.run/Run All - Ultimate [2025.2].run.xml @@ -0,0 +1,25 @@ + + + + + + + + false + true + false + false + + + \ No newline at end of file diff --git a/.run/Run Amazon Q - Community [2025.2].run.xml b/.run/Run Amazon Q - Community [2025.2].run.xml new file mode 100644 index 00000000000..7652b369b5f --- /dev/null +++ b/.run/Run Amazon Q - Community [2025.2].run.xml @@ -0,0 +1,25 @@ + + + + + + + + false + true + false + false + + + \ No newline at end of file diff --git a/.run/Run Amazon Q - Rider [2025.2].run.xml b/.run/Run Amazon Q - Rider [2025.2].run.xml new file mode 100644 index 00000000000..b44257e0f62 --- /dev/null +++ b/.run/Run Amazon Q - Rider [2025.2].run.xml @@ -0,0 +1,25 @@ + + + + + + + + false + true + false + false + + + \ No newline at end of file diff --git a/.run/Run Amazon Q - Ultimate [2025.2].run.xml b/.run/Run Amazon Q - Ultimate [2025.2].run.xml new file mode 100644 index 00000000000..95c4963df05 --- /dev/null +++ b/.run/Run Amazon Q - Ultimate [2025.2].run.xml @@ -0,0 +1,25 @@ + + + + + + + + false + true + false + false + + + \ No newline at end of file diff --git a/.run/generateConfigs.py b/.run/generateConfigs.py index 2041a6a85e9..b18583c0d62 100644 --- a/.run/generateConfigs.py +++ b/.run/generateConfigs.py @@ -52,7 +52,7 @@ def write_config(mv: str, ide: IdeVariant, plugin: PluginVariant): f.write(TEMPLATE.format(plugin = plugin, variant = ide, major_version = mv)) if __name__ == '__main__': - mvs = ["2024.2", "2024.3", "2025.1"] + mvs = ["2024.2", "2024.3", "2025.1", "2025.2"] ides = [ IdeVariant("Community", "IC"), IdeVariant("Rider", "RD"), diff --git a/buildSrc/src/main/kotlin/software/aws/toolkits/gradle/BuildScriptUtils.kt b/buildSrc/src/main/kotlin/software/aws/toolkits/gradle/BuildScriptUtils.kt index b5b02fc20b8..a21655bc4c9 100644 --- a/buildSrc/src/main/kotlin/software/aws/toolkits/gradle/BuildScriptUtils.kt +++ b/buildSrc/src/main/kotlin/software/aws/toolkits/gradle/BuildScriptUtils.kt @@ -30,7 +30,7 @@ fun Project.kotlinTarget(): Provider = withCurrentProfileName { when (it) { "2024.2" -> KotlinVersionEnum.KOTLIN_1_9 "2024.3" -> KotlinVersionEnum.KOTLIN_2_0 - "2025.1" -> KotlinVersionEnum.KOTLIN_2_1 + "2025.1", "2025.2" -> KotlinVersionEnum.KOTLIN_2_1 else -> error("not set") }.version } diff --git a/buildSrc/src/main/kotlin/software/aws/toolkits/gradle/intellij/IdeVersions.kt b/buildSrc/src/main/kotlin/software/aws/toolkits/gradle/intellij/IdeVersions.kt index e0048684766..58ab34a5208 100644 --- a/buildSrc/src/main/kotlin/software/aws/toolkits/gradle/intellij/IdeVersions.kt +++ b/buildSrc/src/main/kotlin/software/aws/toolkits/gradle/intellij/IdeVersions.kt @@ -75,7 +75,8 @@ object IdeVersions { marketplacePlugins = listOf( "org.toml.lang:243.21565.122", "PythonCore:243.21565.211", - "Docker:243.21565.204" + "Docker:243.21565.204", + "com.intellij.modules.json:243.26574.91" ) ), ultimate = ProductProfile( @@ -90,6 +91,7 @@ object IdeVersions { "org.toml.lang:243.21565.122", "Pythonid:243.21565.211", "org.jetbrains.plugins.go:243.21565.211", + "com.intellij.modules.json:243.26574.91" ) ), rider = RiderProfile( @@ -103,7 +105,7 @@ object IdeVersions { Profile( name = "2025.1", gateway = ProductProfile( - sdkVersion = "251.23774.441-CUSTOM-SNAPSHOT", + sdkVersion = "2025.1", bundledPlugins = listOf("org.jetbrains.plugins.terminal") ), community = ProductProfile( @@ -114,8 +116,10 @@ object IdeVersions { "org.jetbrains.idea.maven", ), marketplacePlugins = listOf( + "org.toml.lang:251.26927.47", "PythonCore:251.23774.460", - "Docker:251.23774.466" + "Docker:251.23774.466", + "com.intellij.modules.json:251.27812.12" ) ), ultimate = ProductProfile( @@ -125,10 +129,15 @@ object IdeVersions { "JavaScriptDebugger", "com.intellij.database", "com.jetbrains.codeWithMe", + "intellij.grid.plugin", + "intellij.charts" ), marketplacePlugins = listOf( + "org.toml.lang:251.26927.47", "Pythonid:251.23774.460", + "PythonCore:251.23774.460", "org.jetbrains.plugins.go:251.23774.435", + "com.intellij.modules.json:251.27812.12" ) ), rider = RiderProfile( @@ -139,6 +148,49 @@ object IdeVersions { nugetVersion = " 2025.1.0" ) ), + Profile( + name = "2025.2", + gateway = ProductProfile( + sdkVersion = "252.23892.230", + bundledPlugins = listOf("org.jetbrains.plugins.terminal") + ), + community = ProductProfile( + sdkVersion = "252.23892.248-EAP-SNAPSHOT", + bundledPlugins = commonPlugins + listOf( + "com.intellij.java", + "com.intellij.gradle", + "org.jetbrains.idea.maven", + "com.intellij.properties" + ), + marketplacePlugins = listOf( + "org.toml.lang:252.23892.361", + "PythonCore:252.23892.248", + "Docker:252.23892.248", + "com.intellij.modules.json:252.23892.248" + ) + ), + ultimate = ProductProfile( + sdkVersion = "252.23892.248-EAP-SNAPSHOT", + bundledPlugins = commonPlugins + listOf( + "JavaScript", + "JavaScriptDebugger", + "com.intellij.database", + "com.jetbrains.codeWithMe", + ), + marketplacePlugins = listOf( + "Pythonid:252.23892.248", + "org.jetbrains.plugins.go:252.23892.248", + "com.intellij.modules.json:252.23892.248" + ) + ), + rider = RiderProfile( + sdkVersion = "2025.2-EAP8-SNAPSHOT", + bundledPlugins = commonPlugins, + netFrameworkTarget = "net472", + rdGenVersion = "2025.2.2", + nugetVersion = "2025.2.0-eap08" + ) + ) ).associateBy { it.name } fun ideProfile(project: Project): Profile = ideProfile(project.providers).get() diff --git a/buildSrc/src/main/kotlin/software/aws/toolkits/gradle/resources/ValidateMessages.kt b/buildSrc/src/main/kotlin/software/aws/toolkits/gradle/resources/ValidateMessages.kt index a0dc28e8750..e35c7795ba7 100644 --- a/buildSrc/src/main/kotlin/software/aws/toolkits/gradle/resources/ValidateMessages.kt +++ b/buildSrc/src/main/kotlin/software/aws/toolkits/gradle/resources/ValidateMessages.kt @@ -21,9 +21,9 @@ open class ValidateMessages : DefaultTask() { val paths: ConfigurableFileCollection = project.objects.fileCollection() @OutputFile - val output: RegularFileProperty = project.objects.fileProperty().convention { - project.buildDir.resolve("validateMessages") - } + val output: RegularFileProperty = project.objects.fileProperty().convention( + project.layout.buildDirectory.file("validateMessages") + ) init { group = VERIFICATION_GROUP diff --git a/buildSrc/src/main/kotlin/temp-toolkit-intellij-root-conventions.gradle.kts b/buildSrc/src/main/kotlin/temp-toolkit-intellij-root-conventions.gradle.kts index d77ad7ffa69..2de7f72e184 100644 --- a/buildSrc/src/main/kotlin/temp-toolkit-intellij-root-conventions.gradle.kts +++ b/buildSrc/src/main/kotlin/temp-toolkit-intellij-root-conventions.gradle.kts @@ -23,10 +23,10 @@ plugins { id("toolkit-publish-root-conventions") } -toolkitIntelliJ.apply { - val runIdeVariant = providers.gradleProperty("runIdeVariant") - ideFlavor.set(IdeFlavor.values().firstOrNull { it.name == runIdeVariant.orNull } ?: IdeFlavor.IC) -} +//toolkitIntelliJ.apply { +// val runIdeVariant = providers.gradleProperty("runIdeVariant") +// ideFlavor.set(IdeFlavor.values().firstOrNull { it.name == runIdeVariant.orNull } ?: IdeFlavor.IC) +//} val remoteRobotPort: String by project val ideProfile = IdeVersions.ideProfile(project) @@ -66,12 +66,12 @@ tasks.test { } dependencies { - intellijPlatform { - val type = toolkitIntelliJ.ideFlavor.map { IntelliJPlatformType.fromCode(it.toString()) } - val version = toolkitIntelliJ.version() - - create(type, version, useInstaller = false) - } +// intellijPlatform { +// val type = toolkitIntelliJ.ideFlavor.map { IntelliJPlatformType.fromCode(it.toString()) } +// val version = toolkitIntelliJ.version() +// +// create(type, version, useInstaller = false) +// } implementation(project(":plugin-toolkit:jetbrains-ultimate")) project.findProject(":plugin-toolkit:jetbrains-gateway")?.let { diff --git a/buildSrc/src/main/kotlin/toolkit-intellij-plugin.gradle.kts b/buildSrc/src/main/kotlin/toolkit-intellij-plugin.gradle.kts index 5252c23e1bb..720e9913b72 100644 --- a/buildSrc/src/main/kotlin/toolkit-intellij-plugin.gradle.kts +++ b/buildSrc/src/main/kotlin/toolkit-intellij-plugin.gradle.kts @@ -2,9 +2,28 @@ // SPDX-License-Identifier: Apache-2.0 import org.jetbrains.intellij.platform.gradle.tasks.aware.SandboxAware import software.aws.toolkits.gradle.ciOnly +import software.aws.toolkits.gradle.intellij.IdeFlavor import software.aws.toolkits.gradle.intellij.ToolkitIntelliJExtension -project.extensions.create("intellijToolkit") +val intellijToolkit = project.extensions.create("intellijToolkit", ToolkitIntelliJExtension::class) +// TODO: how did this break? +when { + project.name.contains("jetbrains-rider") -> { + intellijToolkit.ideFlavor.set(IdeFlavor.RD) + } + + project.name.contains("jetbrains-ultimate") -> { + intellijToolkit.ideFlavor.set(IdeFlavor.IU) + } + + project.name.contains("jetbrains-gateway") -> { + intellijToolkit.ideFlavor.set(IdeFlavor.GW) + } + + else -> { + intellijToolkit.ideFlavor.set(IdeFlavor.IC) + } +} plugins { id("org.jetbrains.intellij.platform.module") @@ -14,12 +33,6 @@ intellijPlatform { instrumentCode = false } -dependencies { - intellijPlatform { - instrumentationTools() - } -} - // CI keeps running out of RAM, so limit IDE instance count to 4 ciOnly { abstract class NoopBuildService : BuildService {} diff --git a/buildSrc/src/main/kotlin/toolkit-intellij-subplugin.gradle.kts b/buildSrc/src/main/kotlin/toolkit-intellij-subplugin.gradle.kts index 42e4ab2edb6..c2273e58c45 100644 --- a/buildSrc/src/main/kotlin/toolkit-intellij-subplugin.gradle.kts +++ b/buildSrc/src/main/kotlin/toolkit-intellij-subplugin.gradle.kts @@ -87,14 +87,15 @@ intellijPlatform { dependencies { intellijPlatform { - instrumentationTools() + val version = toolkitIntelliJ.version() // annoying resolution issue that we don't want to bother fixing if (!project.name.contains("jetbrains-gateway")) { val type = toolkitIntelliJ.ideFlavor.map { IntelliJPlatformType.fromCode(it.toString()) } - val version = toolkitIntelliJ.version() create(type, version, useInstaller = false) + } else { + create(IntelliJPlatformType.Gateway, version) } bundledPlugins(toolkitIntelliJ.productProfile().map { it.bundledPlugins }) diff --git a/buildSrc/src/main/kotlin/toolkit-jvm-conventions.gradle.kts b/buildSrc/src/main/kotlin/toolkit-jvm-conventions.gradle.kts index b8a77fff86b..6eb8622f5fa 100644 --- a/buildSrc/src/main/kotlin/toolkit-jvm-conventions.gradle.kts +++ b/buildSrc/src/main/kotlin/toolkit-jvm-conventions.gradle.kts @@ -2,8 +2,9 @@ // SPDX-License-Identifier: Apache-2.0 import org.gradle.kotlin.dsl.kotlin -import org.gradle.kotlin.dsl.withType -import org.jetbrains.kotlin.gradle.tasks.KotlinCompile +import org.jetbrains.kotlin.gradle.dsl.JvmDefaultMode +import org.jetbrains.kotlin.gradle.dsl.JvmTarget +import org.jetbrains.kotlin.gradle.dsl.KotlinVersion import software.aws.toolkits.gradle.jvmTarget import software.aws.toolkits.gradle.kotlinTarget @@ -18,11 +19,11 @@ java { targetCompatibility = javaVersion } -tasks.withType().configureEach { - kotlinOptions { - jvmTarget = javaVersion.majorVersion - apiVersion = project.kotlinTarget().get() - languageVersion = project.kotlinTarget().get() - freeCompilerArgs = listOf("-Xjvm-default=all") +kotlin { + compilerOptions { + jvmTarget = JvmTarget.fromTarget("21") + languageVersion = KotlinVersion.fromVersion(project.kotlinTarget().get()) + apiVersion = KotlinVersion.fromVersion(project.kotlinTarget().get()) + jvmDefault.set(JvmDefaultMode.NO_COMPATIBILITY) } } diff --git a/buildSrc/src/main/kotlin/toolkit-kotlin-conventions.gradle.kts b/buildSrc/src/main/kotlin/toolkit-kotlin-conventions.gradle.kts index ec725d6bf7b..c3b10d9668e 100644 --- a/buildSrc/src/main/kotlin/toolkit-kotlin-conventions.gradle.kts +++ b/buildSrc/src/main/kotlin/toolkit-kotlin-conventions.gradle.kts @@ -19,7 +19,7 @@ dependencies { // - 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 //- The Kotlin Coroutines library should not be added explicitly to the project as it is already provided with the IntelliJ Platform. implementation(versionCatalog.findBundle("kotlin").get()) - implementation(versionCatalog.findLibrary("kotlin-coroutines").get()) +// implementation(versionCatalog.findLibrary("kotlin-coroutines").get()) testFixturesApi(versionCatalog.findLibrary("kotlin-test").get()) testFixturesApi(versionCatalog.findLibrary("kotlin-coroutinesDebug").get()) { diff --git a/gradle.properties b/gradle.properties index d48a9013958..dc92517bb5c 100644 --- a/gradle.properties +++ b/gradle.properties @@ -8,7 +8,7 @@ toolkitVersion=3.88-SNAPSHOT publishToken= publishChannel= -ideProfileName=2025.1 +ideProfileName=2025.2 remoteRobotPort=8080 @@ -19,7 +19,7 @@ kotlin.code.style=official org.gradle.parallel=true org.gradle.caching=true org.gradle.jvmargs=-Xmx4g -kotlin.daemon.jvmargs=-Xmx1500m -Xms500m +kotlin.daemon.jvmargs=-Xmx2000m -Xms500m # prefer non-enterprise variant of test-retry systemProp.develocity.testretry.enabled=false diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index bc7d7457ab3..7581699cacd 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -6,7 +6,7 @@ assertJ = "3.26.3" # match with /settings.gradle.kts awsSdk = "2.26.25" commonmark = "0.22.0" -detekt = "1.23.7" +detekt = "1.23.8" diff-util = "4.12" intellijExt = "1.1.8" # match with /settings.gradle.kts @@ -16,12 +16,12 @@ jackson = "2.17.2" jacoco = "0.8.12" jgit = "6.5.0.202303070854-r" junit4 = "4.13.2" -junit5 = "5.11.0" +junit5 = "5.13.4" # https://plugins.jetbrains.com/docs/intellij/kotlin.html#adding-kotlin-support # https://kotlinlang.org/docs/releases.html#release-details -kotlin = "2.1.20" +kotlin = "2.2.0" # set in /settings.gradle.kts -kotlinCoroutines = "1.8.0" +kotlinCoroutines = "1.10.1" lsp4j = "0.24.0" mockito = "5.12.0" mockitoKotlin = "5.4.1-SNAPSHOT" diff --git a/kotlinResolution.settings.gradle.kts b/kotlinResolution.settings.gradle.kts index d78853740bc..5078b59a6de 100644 --- a/kotlinResolution.settings.gradle.kts +++ b/kotlinResolution.settings.gradle.kts @@ -14,6 +14,10 @@ dependencyResolutionManagement { "1.8.0-intellij-11" } + "2025.2" -> { + "1.10.1-intellij-5" + } + else -> { error("not set") } } diff --git a/plugins/amazonq/chat/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonqDoc/controller/DocController.kt b/plugins/amazonq/chat/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonqDoc/controller/DocController.kt index 94b840aae12..3ca3aae2345 100644 --- a/plugins/amazonq/chat/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonqDoc/controller/DocController.kt +++ b/plugins/amazonq/chat/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonqDoc/controller/DocController.kt @@ -19,7 +19,6 @@ import com.intellij.openapi.vfs.VfsUtil import com.intellij.openapi.wm.ToolWindowManager import com.intellij.testFramework.LightVirtualFile import kotlinx.coroutines.withContext -import org.intellij.images.fileTypes.impl.SvgFileType import software.amazon.awssdk.services.codewhispererruntime.model.DocFolderLevel import software.amazon.awssdk.services.codewhispererruntime.model.DocInteractionType import software.amazon.awssdk.services.codewhispererruntime.model.DocUserDecision @@ -400,7 +399,7 @@ class DocController( // instead of diff display generated svg in edit/preview window val inMemoryFile = LightVirtualFile( message.filePath, - SvgFileType.INSTANCE, + null, newFileContent ) inMemoryFile.isWritable = false diff --git a/plugins/amazonq/codetransform/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codemodernizer/utils/CodeTransformApiUtils.kt b/plugins/amazonq/codetransform/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codemodernizer/utils/CodeTransformApiUtils.kt index db25052ec40..915b3891ac8 100644 --- a/plugins/amazonq/codetransform/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codemodernizer/utils/CodeTransformApiUtils.kt +++ b/plugins/amazonq/codetransform/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codemodernizer/utils/CodeTransformApiUtils.kt @@ -4,7 +4,6 @@ package software.aws.toolkits.jetbrains.services.codemodernizer.utils import com.fasterxml.jackson.module.kotlin.readValue -import com.intellij.grazie.utils.orFalse import com.intellij.openapi.application.runInEdt import com.intellij.openapi.application.runWriteAction import com.intellij.openapi.diff.impl.patch.PatchReader @@ -288,7 +287,7 @@ fun findDownloadArtifactProgressUpdate(transformationSteps: List update.name() == "1" }.orFalse() +fun isPlanComplete(plan: TransformationPlan?) = plan?.transformationSteps()?.get(0)?.progressUpdates()?.any { update -> update.name() == "1" } == true // "name" holds the ID of the corresponding plan step (where table will go) and "description" holds the plan data fun getTableMapping(stepZeroProgressUpdates: List): Map> = diff --git a/plugins/amazonq/codewhisperer/jetbrains-community/tst/software/aws/toolkits/jetbrains/services/codewhisperer/CodeWhispererTestBase.kt b/plugins/amazonq/codewhisperer/jetbrains-community/tst/software/aws/toolkits/jetbrains/services/codewhisperer/CodeWhispererTestBase.kt index 89069f490e7..09b2ef98366 100644 --- a/plugins/amazonq/codewhisperer/jetbrains-community/tst/software/aws/toolkits/jetbrains/services/codewhisperer/CodeWhispererTestBase.kt +++ b/plugins/amazonq/codewhisperer/jetbrains-community/tst/software/aws/toolkits/jetbrains/services/codewhisperer/CodeWhispererTestBase.kt @@ -7,6 +7,7 @@ import com.intellij.openapi.application.ApplicationManager import com.intellij.openapi.editor.Editor import com.intellij.openapi.project.Project import com.intellij.openapi.util.Disposer +import com.intellij.openapi.vfs.newvfs.impl.VfsRootAccess import com.intellij.psi.PsiFile import com.intellij.testFramework.DisposableRule import com.intellij.testFramework.RuleChain @@ -116,6 +117,7 @@ open class CodeWhispererTestBase { @Before open fun setUp() = runTest { mockLanguageServer = mockk() + VfsRootAccess.allowRootAccess(disposableRule.disposable, "/usr/bin", "/usr/local/bin", "C:/Program Files/pypy3.10-v7.3.17-win64") val starter = object : AmazonQServerInstanceStarter { override fun start( project: Project, diff --git a/plugins/amazonq/mynah-ui/build.gradle.kts b/plugins/amazonq/mynah-ui/build.gradle.kts index 971373ab759..fb35324922e 100644 --- a/plugins/amazonq/mynah-ui/build.gradle.kts +++ b/plugins/amazonq/mynah-ui/build.gradle.kts @@ -8,7 +8,7 @@ plugins { } // mynah build assumes 'build/' belongs to itself, which conflicts with gradle -buildDir = file("gradle_build") +layout.buildDirectory = file("gradle_build") val buildMynahUI = tasks.register("buildMynahUI") { dependsOn(tasks.npmInstall) diff --git a/plugins/amazonq/shared/jetbrains-community/src-242-251/software/aws/toolkits/jetbrains/services/amazonq/lsp/dependencies/providers/PythonModuleUtil.kt b/plugins/amazonq/shared/jetbrains-community/src-242-251/software/aws/toolkits/jetbrains/services/amazonq/lsp/dependencies/providers/PythonModuleUtil.kt new file mode 100644 index 00000000000..b0766e38e7d --- /dev/null +++ b/plugins/amazonq/shared/jetbrains-community/src-242-251/software/aws/toolkits/jetbrains/services/amazonq/lsp/dependencies/providers/PythonModuleUtil.kt @@ -0,0 +1,9 @@ +// Copyright 2025 Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +package software.aws.toolkits.jetbrains.services.amazonq.lsp.dependencies.providers +import com.jetbrains.python.packaging.common.PythonPackage +import com.jetbrains.python.packaging.management.PythonPackageManager + +fun getInstalledPackages(packageManager: PythonPackageManager): List = + packageManager.installedPackages diff --git a/plugins/amazonq/shared/jetbrains-community/src-252+/software/aws/toolkits/jetbrains/services/amazonq/lsp/dependencies/providers/PythonModuleUtil.kt b/plugins/amazonq/shared/jetbrains-community/src-252+/software/aws/toolkits/jetbrains/services/amazonq/lsp/dependencies/providers/PythonModuleUtil.kt new file mode 100644 index 00000000000..b49412fa68c --- /dev/null +++ b/plugins/amazonq/shared/jetbrains-community/src-252+/software/aws/toolkits/jetbrains/services/amazonq/lsp/dependencies/providers/PythonModuleUtil.kt @@ -0,0 +1,9 @@ +// Copyright 2025 Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +package software.aws.toolkits.jetbrains.services.amazonq.lsp.dependencies.providers +import com.jetbrains.python.packaging.common.PythonPackage +import com.jetbrains.python.packaging.management.PythonPackageManager + +fun getInstalledPackages(packageManager: PythonPackageManager): List = + packageManager.listInstalledPackagesSnapshot() diff --git a/plugins/amazonq/shared/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonq/lsp/dependencies/providers/PythonModuleDependencyProvider.kt b/plugins/amazonq/shared/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonq/lsp/dependencies/providers/PythonModuleDependencyProvider.kt index 9a7961d4fbe..9246eae2ee0 100644 --- a/plugins/amazonq/shared/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonq/lsp/dependencies/providers/PythonModuleDependencyProvider.kt +++ b/plugins/amazonq/shared/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonq/lsp/dependencies/providers/PythonModuleDependencyProvider.kt @@ -19,7 +19,7 @@ internal class PythonModuleDependencyProvider : ModuleDependencyProvider { PythonSdkUtil.findPythonSdk(module)?.let { sdk -> PythonSdkUtil.getSitePackagesDirectory(sdk)?.let { sitePackagesDir -> val packageManager = PythonPackageManager.forSdk(module.project, sdk) - packageManager.installedPackages.forEach { pkg -> + getInstalledPackages(packageManager).forEach { pkg -> val packageDir = sitePackagesDir.findChild(pkg.name) if (packageDir != null) { dependencies.add(packageDir.path) diff --git a/plugins/amazonq/shared/jetbrains-community/src/software/aws/toolkits/resources/AmazonQBundle.kt b/plugins/amazonq/shared/jetbrains-community/src/software/aws/toolkits/resources/AmazonQBundle.kt index 4bfe413dc93..df34bfd73d8 100644 --- a/plugins/amazonq/shared/jetbrains-community/src/software/aws/toolkits/resources/AmazonQBundle.kt +++ b/plugins/amazonq/shared/jetbrains-community/src/software/aws/toolkits/resources/AmazonQBundle.kt @@ -10,9 +10,9 @@ object AmazonQBundle { private const val BUNDLE_FQN: String = "software.aws.toolkits.resources.AmazonQBundle" private val BUNDLE = DynamicBundle(AmazonQBundle::class.java, BUNDLE_FQN) - fun message(key: @PropertyKey(resourceBundle = BUNDLE_FQN) String, vararg params: Any) = + fun message(@PropertyKey(resourceBundle = BUNDLE_FQN) key: String, vararg params: Any) = BUNDLE.getMessage(key, *params) - fun messagePointer(key: @PropertyKey(resourceBundle = BUNDLE_FQN) String, vararg params: Any) = + fun messagePointer(@PropertyKey(resourceBundle = BUNDLE_FQN) key: String, vararg params: Any) = BUNDLE.getLazyMessage(key, *params) } diff --git a/plugins/core/core/build.gradle.kts b/plugins/core/core/build.gradle.kts index 00bc6beedc6..c7cda1cbfa4 100644 --- a/plugins/core/core/build.gradle.kts +++ b/plugins/core/core/build.gradle.kts @@ -11,6 +11,7 @@ plugins { dependencies { compileOnlyApi(project(":plugin-core:resources")) compileOnlyApi(project(":plugin-core:sdk-codegen")) + compileOnly(libs.kotlin.coroutines) api(libs.aws.cognitoidentity) api(libs.aws.ecr) diff --git a/plugins/core/jetbrains-community/src/software/aws/toolkits/resources/AwsCoreBundle.kt b/plugins/core/jetbrains-community/src/software/aws/toolkits/resources/AwsCoreBundle.kt index 0bd4415e260..b752f3b795d 100644 --- a/plugins/core/jetbrains-community/src/software/aws/toolkits/resources/AwsCoreBundle.kt +++ b/plugins/core/jetbrains-community/src/software/aws/toolkits/resources/AwsCoreBundle.kt @@ -11,9 +11,9 @@ internal const val BUNDLE_FQN: String = "software.aws.toolkits.resources.Message object AwsCoreBundle { private val BUNDLE = DynamicBundle(AwsCoreBundle::class.java, BUNDLE_FQN) - fun message(key: @PropertyKey(resourceBundle = BUNDLE_FQN) String, vararg params: Any) = + fun message(@PropertyKey(resourceBundle = BUNDLE_FQN) key: String, vararg params: Any) = BUNDLE.getMessage(key, *params) - fun messagePointer(key: @PropertyKey(resourceBundle = BUNDLE_FQN) String, vararg params: Any) = + fun messagePointer(@PropertyKey(resourceBundle = BUNDLE_FQN) key: String, vararg params: Any) = BUNDLE.getLazyMessage(key, *params) } diff --git a/plugins/core/jetbrains-community/tst/software/aws/toolkits/jetbrains/core/AwsResourceCacheTest.kt b/plugins/core/jetbrains-community/tst/software/aws/toolkits/jetbrains/core/AwsResourceCacheTest.kt index ec06877bbab..1154797ef58 100644 --- a/plugins/core/jetbrains-community/tst/software/aws/toolkits/jetbrains/core/AwsResourceCacheTest.kt +++ b/plugins/core/jetbrains-community/tst/software/aws/toolkits/jetbrains/core/AwsResourceCacheTest.kt @@ -9,7 +9,7 @@ import com.intellij.testFramework.RuleChain import kotlinx.coroutines.ExperimentalCoroutinesApi import kotlinx.coroutines.delay import kotlinx.coroutines.runBlocking -import kotlinx.coroutines.test.runBlockingTest +import kotlinx.coroutines.test.runTest import org.assertj.core.api.Assertions.assertThat import org.assertj.core.api.Assertions.assertThatThrownBy import org.junit.Before @@ -484,7 +484,7 @@ class AwsResourceCacheTest { whenever(mockResource.fetch(any())).then { latch.await() // exception gets thrown fast enough where the second fetchIfNeeded check occurs after the first call throws - runBlockingTest { + runTest { delay(500) } throw RuntimeException("Boom") diff --git a/plugins/core/jetbrains-community/tstFixtures/com/intellij/testFramework/junit5/impl/TestDisposableExtension.kt b/plugins/core/jetbrains-community/tstFixtures/com/intellij/testFramework/junit5/impl/TestDisposableExtension.kt index 4baeced5f12..f031ddbb151 100644 --- a/plugins/core/jetbrains-community/tstFixtures/com/intellij/testFramework/junit5/impl/TestDisposableExtension.kt +++ b/plugins/core/jetbrains-community/tstFixtures/com/intellij/testFramework/junit5/impl/TestDisposableExtension.kt @@ -18,12 +18,12 @@ import org.junit.platform.commons.util.ReflectionUtils * the binary method signature change of [ReflectionUtils.makeAccessible] caused by JUnit 5.11.0 in * https://github.com/junit-team/junit5/commit/abb5ed16be3a9ce552f4a45c11264ded608ae9da */ -@TestOnly internal class TestDisposableExtension : BeforeEachCallback, AfterEachCallback, ParameterResolver { + @TestOnly override fun beforeEach(context: ExtensionContext) { val instance = context.requiredTestInstance for (field in findAnnotatedFields(instance.javaClass, TestDisposable::class.java, ReflectionUtils::isNotStatic)) { @@ -31,6 +31,7 @@ internal class TestDisposableExtension : } } + @TestOnly override fun afterEach(context: ExtensionContext) { context.testDisposableIfRequested()?.let { disposable -> Assertions.assertFalse(disposable.isDisposed) @@ -38,10 +39,12 @@ internal class TestDisposableExtension : } } + @TestOnly override fun supportsParameter(parameterContext: ParameterContext, extensionContext: ExtensionContext): Boolean { return parameterContext.parameter.type === Disposable::class.java && parameterContext.isAnnotated(TestDisposable::class.java) } + @TestOnly override fun resolveParameter(parameterContext: ParameterContext, extensionContext: ExtensionContext): Any { return extensionContext.testDisposable() } diff --git a/plugins/core/jetbrains-community/tstFixtures/software/aws/toolkits/jetbrains/utils/extensions/SsoLoginExtension.kt b/plugins/core/jetbrains-community/tstFixtures/software/aws/toolkits/jetbrains/utils/extensions/SsoLoginExtension.kt index b6c95ac1eb6..f6ee307b295 100644 --- a/plugins/core/jetbrains-community/tstFixtures/software/aws/toolkits/jetbrains/utils/extensions/SsoLoginExtension.kt +++ b/plugins/core/jetbrains-community/tstFixtures/software/aws/toolkits/jetbrains/utils/extensions/SsoLoginExtension.kt @@ -4,7 +4,6 @@ package software.aws.toolkits.jetbrains.utils.extensions import com.intellij.testFramework.DisposableRule -import org.jetbrains.annotations.TestOnly import org.junit.jupiter.api.extension.AfterEachCallback import org.junit.jupiter.api.extension.BeforeEachCallback import org.junit.jupiter.api.extension.ExtendWith @@ -42,7 +41,6 @@ class SsoLoginExtension : DisposableRule(), BeforeEachCallback, AfterEachCallbac } } -@TestOnly @Target(AnnotationTarget.FUNCTION, AnnotationTarget.CLASS) @ExtendWith(SsoLoginExtension::class) annotation class SsoLogin(val secretName: String) diff --git a/plugins/core/resources/build.gradle.kts b/plugins/core/resources/build.gradle.kts index 19e00ac3308..658da9abc66 100644 --- a/plugins/core/resources/build.gradle.kts +++ b/plugins/core/resources/build.gradle.kts @@ -12,7 +12,7 @@ plugins { sourceSets { main { - resources.srcDir("$buildDir/downloaded-resources") + resources.srcDir(layout.buildDirectory.dir("downloaded-resources")) } } @@ -26,12 +26,13 @@ tasks.test { } val download = tasks.register("downloadResources") { - dest("$buildDir/downloaded-resources/software/aws/toolkits/resources/") + val resourcesDir = layout.buildDirectory.dir("downloaded-resources/software/aws/toolkits/resources/").get().asFile + dest(resourcesDir) src(listOf("https://idetoolkits.amazonwebservices.com/endpoints.json")) onlyIfModified(true) useETag(true) doFirst { - mkdir("$buildDir/downloaded-resources/software/aws/toolkits/resources/") + mkdir(resourcesDir) } } diff --git a/plugins/core/sdk-codegen/build.gradle.kts b/plugins/core/sdk-codegen/build.gradle.kts index 68e4e88e1a3..7e2a2249ec7 100644 --- a/plugins/core/sdk-codegen/build.gradle.kts +++ b/plugins/core/sdk-codegen/build.gradle.kts @@ -7,7 +7,7 @@ plugins { sdkGenerator { c2jFolder.set(file("$projectDir/codegen-resources")) - outputDir.set(file("$buildDir/generated-sources")) + outputDir.set(layout.buildDirectory.dir("generated-sources").get().asFile) } dependencies { diff --git a/plugins/core/webview/build.gradle.kts b/plugins/core/webview/build.gradle.kts index e9acecee7b3..cb5c685986c 100644 --- a/plugins/core/webview/build.gradle.kts +++ b/plugins/core/webview/build.gradle.kts @@ -7,7 +7,7 @@ plugins { alias(libs.plugins.node.gradle) } -buildDir = file("gradle_build") +layout.buildDirectory = file("gradle_build") val buildGetStartUI = tasks.register("buildWebviewUI") { dependsOn(tasks.npmInstall) diff --git a/plugins/toolkit/intellij-standalone/build.gradle.kts b/plugins/toolkit/intellij-standalone/build.gradle.kts index 0b4c6b27eae..02393de5d3b 100644 --- a/plugins/toolkit/intellij-standalone/build.gradle.kts +++ b/plugins/toolkit/intellij-standalone/build.gradle.kts @@ -27,6 +27,12 @@ dependencies { } } +tasks.prepareJarSearchableOptions { + val pluginXmlJar = project(":plugin-core").tasks.jar + dependsOn(pluginXmlJar) + composedJarFile.set(pluginXmlJar.flatMap { it.archiveFile }) +} + tasks.check { val serviceSubdirs = project(":plugin-toolkit").subprojects .map { it.name }.filter { it != "intellij" }.filter { it != "intellij-standalone" } diff --git a/plugins/toolkit/jetbrains-core/build.gradle.kts b/plugins/toolkit/jetbrains-core/build.gradle.kts index 34bb92354b5..8639c64908b 100644 --- a/plugins/toolkit/jetbrains-core/build.gradle.kts +++ b/plugins/toolkit/jetbrains-core/build.gradle.kts @@ -42,7 +42,7 @@ dependencies { val changelog = tasks.register("pluginChangeLog") { includeUnreleased.set(true) - changeLogFile.set(project.file("$buildDir/changelog/change-notes.xml")) + changeLogFile.set(project.layout.buildDirectory.file("changelog/change-notes.xml")) } tasks.compileJava { @@ -113,7 +113,7 @@ val gatewayArtifacts by configurations.creating { extendsFrom(configurations["implementation"], configurations["runtimeOnly"]) } -val gatewayJar = tasks.create("gatewayJar") { +val gatewayJar = tasks.register("gatewayJar") { // META-INF/plugin.xml is a duplicate? // unclear why the exclude() statement didn't work duplicatesStrategy = DuplicatesStrategy.WARN diff --git a/plugins/toolkit/jetbrains-core/src/software/aws/toolkits/jetbrains/core/explorer/devToolsTab/nodes/actions/CopyCawsRepositoryUrl.kt b/plugins/toolkit/jetbrains-core/src/software/aws/toolkits/jetbrains/core/explorer/devToolsTab/nodes/actions/CopyCawsRepositoryUrl.kt index ac47c1076c6..1b7ca567788 100644 --- a/plugins/toolkit/jetbrains-core/src/software/aws/toolkits/jetbrains/core/explorer/devToolsTab/nodes/actions/CopyCawsRepositoryUrl.kt +++ b/plugins/toolkit/jetbrains-core/src/software/aws/toolkits/jetbrains/core/explorer/devToolsTab/nodes/actions/CopyCawsRepositoryUrl.kt @@ -4,11 +4,9 @@ package software.aws.toolkits.jetbrains.core.explorer.devToolsTab.nodes.actions import com.intellij.icons.AllIcons -import com.intellij.openapi.actionSystem.ActionManager -import com.intellij.openapi.actionSystem.AnAction import com.intellij.openapi.actionSystem.AnActionEvent import com.intellij.openapi.actionSystem.CommonDataKeys -import com.intellij.openapi.actionSystem.ComputableActionGroup +import com.intellij.openapi.actionSystem.DefaultActionGroup import com.intellij.openapi.ide.CopyPasteManager import com.intellij.openapi.progress.ProgressIndicator import com.intellij.openapi.progress.Task @@ -31,32 +29,34 @@ class CopyCawsRepositoryUrl : DumbAwareAction(AllIcons.Actions.Copy) { val project = e.getRequiredData(CommonDataKeys.PROJECT) val cawsConnectionSettings = CodeCatalystCredentialManager.getInstance(project).getConnectionSettings() ?: return - JBPopupFactory.getInstance().createActionGroupPopup( - message("caws.copy.url.select_repository"), - object : ComputableActionGroup.Simple() { - override fun computeChildren(manager: ActionManager): Array { - val cache = AwsResourceCache.getInstance() - return runBlocking { - val projects = cache.getResource(CawsResources.ALL_PROJECTS, cawsConnectionSettings).await() + val cache = AwsResourceCache.getInstance() + val actions = runBlocking { + val projects = cache.getResource(CawsResources.ALL_PROJECTS, cawsConnectionSettings).await() - projects.flatMap { cawsProject -> - cache.getResource(CawsResources.codeRepositories(cawsProject), cawsConnectionSettings).await() - }.map { - object : DumbAwareAction(it.presentableString) { - override fun actionPerformed(e: AnActionEvent) { - copyUrl(project, cawsConnectionSettings, it) - } - } - }.toTypedArray() + projects.flatMap { cawsProject -> + cache.getResource(CawsResources.codeRepositories(cawsProject), cawsConnectionSettings).await() + }.map { + object : DumbAwareAction(it.presentableString) { + override fun actionPerformed(e: AnActionEvent) { + copyUrl(project, cawsConnectionSettings, it) } } - }, + }.toList() + } + + val actionGroup = DefaultActionGroup().apply { + actions.forEach { add(it) } + } + + val popup = JBPopupFactory.getInstance().createActionGroupPopup( + message("caws.copy.url.select_repository"), + actionGroup, e.dataContext, false, null, 5 ) - .showInBestPositionFor(e.dataContext) + popup.showCenteredInCurrentWindow(project) } private fun copyUrl(project: Project, cawsConnectionSettings: ClientConnectionSettings<*>, repository: CawsCodeRepository) { diff --git a/plugins/toolkit/jetbrains-core/src/software/aws/toolkits/jetbrains/services/dynamodb/editor/actions/ConfigureMaxResultsAction.kt b/plugins/toolkit/jetbrains-core/src/software/aws/toolkits/jetbrains/services/dynamodb/editor/actions/ConfigureMaxResultsAction.kt index 4716c7c43a1..f65c938d317 100644 --- a/plugins/toolkit/jetbrains-core/src/software/aws/toolkits/jetbrains/services/dynamodb/editor/actions/ConfigureMaxResultsAction.kt +++ b/plugins/toolkit/jetbrains-core/src/software/aws/toolkits/jetbrains/services/dynamodb/editor/actions/ConfigureMaxResultsAction.kt @@ -3,20 +3,22 @@ package software.aws.toolkits.jetbrains.services.dynamodb.editor.actions -import com.intellij.openapi.actionSystem.ActionManager import com.intellij.openapi.actionSystem.ActionUpdateThread -import com.intellij.openapi.actionSystem.AnAction import com.intellij.openapi.actionSystem.AnActionEvent -import com.intellij.openapi.actionSystem.ComputableActionGroup import com.intellij.openapi.actionSystem.DataContext +import com.intellij.openapi.actionSystem.DefaultActionGroup import com.intellij.openapi.actionSystem.PlatformDataKeys import com.intellij.openapi.actionSystem.ToggleAction import com.intellij.openapi.project.DumbAware import software.aws.toolkits.jetbrains.services.dynamodb.editor.DynamoDbTableEditor -class ConfigureMaxResultsAction : ComputableActionGroup.Simple(/* popup */ true) { - override fun computeChildren(manager: ActionManager): Array = DynamoDbTableEditor.MAX_RESULTS_OPTIONS - .map { (ChangeMaxResults(it)) }.toTypedArray() +class ConfigureMaxResultsAction : DefaultActionGroup(), DumbAware { + init { + isPopup = true + DynamoDbTableEditor.MAX_RESULTS_OPTIONS.forEach { + add(ChangeMaxResults(it)) + } + } private class ChangeMaxResults(private val choice: Int) : ToggleAction(choice.toString()), DumbAware { override fun getActionUpdateThread() = ActionUpdateThread.BGT diff --git a/plugins/toolkit/jetbrains-core/src/software/aws/toolkits/jetbrains/services/s3/resources/S3Resources.kt b/plugins/toolkit/jetbrains-core/src/software/aws/toolkits/jetbrains/services/s3/resources/S3Resources.kt index 42932314e04..90bfb38493f 100644 --- a/plugins/toolkit/jetbrains-core/src/software/aws/toolkits/jetbrains/services/s3/resources/S3Resources.kt +++ b/plugins/toolkit/jetbrains-core/src/software/aws/toolkits/jetbrains/services/s3/resources/S3Resources.kt @@ -7,7 +7,6 @@ import kotlinx.coroutines.async import kotlinx.coroutines.awaitAll import kotlinx.coroutines.runBlocking import kotlinx.coroutines.withContext -import org.jetbrains.annotations.TestOnly import org.slf4j.event.Level import software.amazon.awssdk.services.s3.S3Client import software.amazon.awssdk.services.s3.model.Bucket @@ -28,7 +27,6 @@ object S3Resources { private val LOG = getLogger() private val regions by lazy { AwsRegionProvider.getInstance().allRegions() } - @TestOnly val LIST_REGIONALIZED_BUCKETS = ClientBackedCachedResource(S3Client::class, "s3.list_buckets") { val buckets = listBuckets().buckets() // TODO when the resource cache is coroutine based, remove the runBlocking and withContext diff --git a/plugins/toolkit/jetbrains-core/src/software/aws/toolkits/resources/AwsToolkitBundle.kt b/plugins/toolkit/jetbrains-core/src/software/aws/toolkits/resources/AwsToolkitBundle.kt index 403fb390dd4..414492c1b23 100644 --- a/plugins/toolkit/jetbrains-core/src/software/aws/toolkits/resources/AwsToolkitBundle.kt +++ b/plugins/toolkit/jetbrains-core/src/software/aws/toolkits/resources/AwsToolkitBundle.kt @@ -10,9 +10,9 @@ object AwsToolkitBundle { private const val BUNDLE_FQN: String = "software.aws.toolkits.resources.MessagesBundle" private val BUNDLE = DynamicBundle(AwsToolkitBundle::class.java, BUNDLE_FQN) - fun message(key: @PropertyKey(resourceBundle = BUNDLE_FQN) String, vararg params: Any) = + fun message(@PropertyKey(resourceBundle = BUNDLE_FQN) key: String, vararg params: Any) = BUNDLE.getMessage(key, *params) - fun messagePointer(key: @PropertyKey(resourceBundle = BUNDLE_FQN) String, vararg params: Any) = + fun messagePointer(@PropertyKey(resourceBundle = BUNDLE_FQN) key: String, vararg params: Any) = BUNDLE.getLazyMessage(key, *params) } diff --git a/plugins/toolkit/jetbrains-core/tst-242-251/software/aws/toolkits/jetbrains/services/lambda/java/RunInDumbModeUtil.kt b/plugins/toolkit/jetbrains-core/tst-242-251/software/aws/toolkits/jetbrains/services/lambda/java/RunInDumbModeUtil.kt new file mode 100644 index 00000000000..54b87601cb7 --- /dev/null +++ b/plugins/toolkit/jetbrains-core/tst-242-251/software/aws/toolkits/jetbrains/services/lambda/java/RunInDumbModeUtil.kt @@ -0,0 +1,23 @@ +// Copyright 2025 Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +package software.aws.toolkits.jetbrains.services.lambda.java + +import com.intellij.openapi.project.DumbService +import com.intellij.openapi.project.DumbServiceImpl +import kotlinx.coroutines.runBlocking +import kotlinx.coroutines.withContext +import software.aws.toolkits.jetbrains.core.coroutines.EDT +import software.aws.toolkits.jetbrains.utils.rules.JavaCodeInsightTestFixtureRule + +internal inline fun runInDumbMode(projectRule: JavaCodeInsightTestFixtureRule, crossinline block: () -> Unit) { + val dumbServiceImpl = DumbService.getInstance(projectRule.project) as DumbServiceImpl + runBlocking { + // automatically on correct thread in 233+ + withContext(EDT) { + dumbServiceImpl.runInDumbMode { + block() + } + } + } +} diff --git a/plugins/toolkit/jetbrains-core/tst-252+/software/aws/toolkits/jetbrains/services/lambda/java/RunInDumbModeUtil.kt b/plugins/toolkit/jetbrains-core/tst-252+/software/aws/toolkits/jetbrains/services/lambda/java/RunInDumbModeUtil.kt new file mode 100644 index 00000000000..94b9b63500b --- /dev/null +++ b/plugins/toolkit/jetbrains-core/tst-252+/software/aws/toolkits/jetbrains/services/lambda/java/RunInDumbModeUtil.kt @@ -0,0 +1,24 @@ +// Copyright 2025 Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +package software.aws.toolkits.jetbrains.services.lambda.java + +import com.intellij.openapi.project.DumbService +import com.intellij.openapi.project.DumbServiceImpl +import com.intellij.openapi.project.runInDumbMode +import kotlinx.coroutines.runBlocking +import kotlinx.coroutines.withContext +import software.aws.toolkits.jetbrains.core.coroutines.EDT +import software.aws.toolkits.jetbrains.utils.rules.JavaCodeInsightTestFixtureRule + +internal inline fun runInDumbMode(projectRule: JavaCodeInsightTestFixtureRule, crossinline block: () -> Unit) { + val dumbServiceImpl = DumbService.getInstance(projectRule.project) as DumbServiceImpl + runBlocking { + // automatically on correct thread in 233+ + withContext(EDT) { + dumbServiceImpl.runInDumbMode { + block() + } + } + } +} diff --git a/plugins/toolkit/jetbrains-core/tst/software/aws/toolkits/jetbrains/services/apprunner/actions/DeployActionTest.kt b/plugins/toolkit/jetbrains-core/tst/software/aws/toolkits/jetbrains/services/apprunner/actions/DeployActionTest.kt index 8faf7b510db..fda4341863e 100644 --- a/plugins/toolkit/jetbrains-core/tst/software/aws/toolkits/jetbrains/services/apprunner/actions/DeployActionTest.kt +++ b/plugins/toolkit/jetbrains-core/tst/software/aws/toolkits/jetbrains/services/apprunner/actions/DeployActionTest.kt @@ -10,7 +10,7 @@ import com.intellij.testFramework.DisposableRule import com.intellij.testFramework.runInEdtAndWait import kotlinx.coroutines.ExperimentalCoroutinesApi import kotlinx.coroutines.runBlocking -import kotlinx.coroutines.test.runBlockingTest +import kotlinx.coroutines.test.runTest import org.assertj.core.api.Assertions.assertThat import org.junit.After import org.junit.Before @@ -85,7 +85,7 @@ class DeployActionTest : BaseCoroutineTest(30) { on { startDeployment(any()) } doAnswer { throw RuntimeException("Failed to start deployment") } } - runBlockingTest { + runTest { action.deploy( AppRunnerServiceNode(projectRule.project, ServiceSummary.builder().serviceName(aString()).serviceArn(aString()).build()), appRunnerClient, @@ -114,7 +114,7 @@ class DeployActionTest : BaseCoroutineTest(30) { on { describeLogStreams(any()) } doAnswer { throw RuntimeException("broke") } } - runBlockingTest { + runTest { action.deploy( AppRunnerServiceNode(projectRule.project, ServiceSummary.builder().serviceName(aString()).serviceArn(aString()).build()), appRunnerClient, diff --git a/plugins/toolkit/jetbrains-core/tst/software/aws/toolkits/jetbrains/services/cloudwatch/logs/insights/QueryActorTest.kt b/plugins/toolkit/jetbrains-core/tst/software/aws/toolkits/jetbrains/services/cloudwatch/logs/insights/QueryActorTest.kt index db542602de8..fcbfdf8fb49 100644 --- a/plugins/toolkit/jetbrains-core/tst/software/aws/toolkits/jetbrains/services/cloudwatch/logs/insights/QueryActorTest.kt +++ b/plugins/toolkit/jetbrains-core/tst/software/aws/toolkits/jetbrains/services/cloudwatch/logs/insights/QueryActorTest.kt @@ -8,7 +8,7 @@ import com.intellij.util.ui.ListTableModel import kotlinx.coroutines.ExperimentalCoroutinesApi import kotlinx.coroutines.delay import kotlinx.coroutines.runBlocking -import kotlinx.coroutines.test.runBlockingTest +import kotlinx.coroutines.test.runTest import org.assertj.core.api.Assertions.assertThat import org.junit.After import org.junit.Before @@ -75,7 +75,7 @@ class QueryActorTest : BaseCoroutineTest() { GetQueryResultsResponse.builder().status(QueryStatus.COMPLETE).results(sampleResults).build() ) - runBlockingTest { + runTest { queryactor.channel.send(InsightsQueryResultsActor.Message.StartLoadingAll) tableModel.waitForModelToBeAtLeast(1) } @@ -103,7 +103,7 @@ class QueryActorTest : BaseCoroutineTest() { .thenReturn( GetQueryResultsResponse.builder().status(QueryStatus.COMPLETE).results(firstSampleResultList, secondSampleResultList).build() ) - runBlockingTest { + runTest { queryactor.channel.send(InsightsQueryResultsActor.Message.StartLoadingAll) tableModel.waitForModelToBeAtLeast(2) } @@ -133,7 +133,7 @@ class QueryActorTest : BaseCoroutineTest() { CloudWatchLogsException::class.java ) - runBlockingTest { + runTest { queryactor.channel.send(InsightsQueryResultsActor.Message.StartLoadingAll) while (!queryactor.channel.isClosedForSend) { delay(10) @@ -150,7 +150,7 @@ class QueryActorTest : BaseCoroutineTest() { .thenReturn( GetQueryResultsResponse.builder().status(QueryStatus.COMPLETE).build() ) - runBlockingTest { + runTest { queryactor.channel.send(InsightsQueryResultsActor.Message.StartLoadingAll) waitForTrue { table.emptyText.text == message("cloudwatch.logs.no_results_found") } } @@ -201,7 +201,7 @@ class QueryActorTest : BaseCoroutineTest() { latch.countDown() } - runBlockingTest { + runTest { queryactor.channel.send(InsightsQueryResultsActor.Message.StartLoadingAll) tableModel.waitForModelToBeAtLeast(1) queryactor.channel.send(InsightsQueryResultsActor.Message.StopLoading) diff --git a/plugins/toolkit/jetbrains-core/tst/software/aws/toolkits/jetbrains/services/lambda/java/JavaLambdaHandlerResolverTest.kt b/plugins/toolkit/jetbrains-core/tst/software/aws/toolkits/jetbrains/services/lambda/java/JavaLambdaHandlerResolverTest.kt index 36853c10863..b8f949609f6 100644 --- a/plugins/toolkit/jetbrains-core/tst/software/aws/toolkits/jetbrains/services/lambda/java/JavaLambdaHandlerResolverTest.kt +++ b/plugins/toolkit/jetbrains-core/tst/software/aws/toolkits/jetbrains/services/lambda/java/JavaLambdaHandlerResolverTest.kt @@ -3,19 +3,14 @@ package software.aws.toolkits.jetbrains.services.lambda.java -import com.intellij.openapi.project.DumbService -import com.intellij.openapi.project.DumbServiceImpl import com.intellij.psi.PsiClass import com.intellij.psi.PsiMethod import com.intellij.testFramework.runInEdtAndWait -import kotlinx.coroutines.runBlocking -import kotlinx.coroutines.withContext import org.assertj.core.api.Assertions.assertThat import org.junit.Before import org.junit.Rule import org.junit.Test import software.amazon.awssdk.services.lambda.model.Runtime -import software.aws.toolkits.jetbrains.core.coroutines.EDT import software.aws.toolkits.jetbrains.services.lambda.BuiltInRuntimeGroups import software.aws.toolkits.jetbrains.services.lambda.Lambda import software.aws.toolkits.jetbrains.services.lambda.LambdaHandlerResolver @@ -461,7 +456,7 @@ class JavaLambdaHandlerResolverTest { """ ) - runInDumbMode { + runInDumbMode(projectRule) { runInEdtAndWait { val elements = Lambda.findPsiElementsForHandler( projectRule.project, @@ -485,7 +480,7 @@ class JavaLambdaHandlerResolverTest { """ ) - runInDumbMode { + runInDumbMode(projectRule) { runInEdtAndWait { val handler = JavaLambdaHandlerResolver() .determineHandler(psiClass.findMethodsByName("handleRequest", false)[0]) @@ -506,7 +501,7 @@ class JavaLambdaHandlerResolverTest { """ ) - runInDumbMode { + runInDumbMode(projectRule) { runInEdtAndWait { val handler = JavaLambdaHandlerResolver() .determineHandlers( @@ -526,16 +521,4 @@ class JavaLambdaHandlerResolverTest { assertThat(sut.handlerDisplayName("com.example.LambdaHandler")).isEqualTo("LambdaHandler") assertThat(sut.handlerDisplayName("LambdaHandler::handleRequest")).isEqualTo("LambdaHandler.handleRequest") } - - private inline fun runInDumbMode(crossinline block: () -> Unit) { - val dumbServiceImpl = DumbService.getInstance(projectRule.project) as DumbServiceImpl - runBlocking { - // automatically on correct thread in 233+ - withContext(EDT) { - dumbServiceImpl.runInDumbMode { - block() - } - } - } - } } diff --git a/plugins/toolkit/jetbrains-core/tst/software/aws/toolkits/jetbrains/utils/BaseCoroutineTest.kt b/plugins/toolkit/jetbrains-core/tst/software/aws/toolkits/jetbrains/utils/BaseCoroutineTest.kt index 15723802ee8..3753e1b271c 100644 --- a/plugins/toolkit/jetbrains-core/tst/software/aws/toolkits/jetbrains/utils/BaseCoroutineTest.kt +++ b/plugins/toolkit/jetbrains-core/tst/software/aws/toolkits/jetbrains/utils/BaseCoroutineTest.kt @@ -5,8 +5,7 @@ package software.aws.toolkits.jetbrains.utils import com.intellij.testFramework.ProjectRule import kotlinx.coroutines.ExperimentalCoroutinesApi -import kotlinx.coroutines.test.TestCoroutineScope -import org.junit.After +import kotlinx.coroutines.test.TestScope import org.junit.Rule import software.aws.toolkits.jetbrains.core.MockClientManagerRule @@ -29,10 +28,5 @@ abstract class BaseCoroutineTest(@Suppress("UnusedPrivateMember") timeoutSeconds // @Rule // val timeout = CoroutinesTimeout.seconds(timeoutSeconds) - val testCoroutineScope: TestCoroutineScope = TestCoroutineScope() - - @After - fun after() { - testCoroutineScope.cleanupTestCoroutines() - } + val testCoroutineScope: TestScope = TestScope() } diff --git a/plugins/toolkit/jetbrains-gateway/build.gradle.kts b/plugins/toolkit/jetbrains-gateway/build.gradle.kts index d6f382c2697..3004feb45b0 100644 --- a/plugins/toolkit/jetbrains-gateway/build.gradle.kts +++ b/plugins/toolkit/jetbrains-gateway/build.gradle.kts @@ -7,7 +7,6 @@ import org.jetbrains.intellij.platform.gradle.TestFrameworkType import org.jetbrains.intellij.platform.gradle.tasks.PrepareSandboxTask import org.jetbrains.kotlin.gradle.internal.ensureParentDirsCreated import software.aws.toolkits.gradle.intellij.IdeFlavor -import software.aws.toolkits.gradle.intellij.toolkitIntelliJ import kotlin.io.encoding.Base64 plugins { @@ -48,22 +47,6 @@ val gatewayOnlyResourcesJar by tasks.registering(Jar::class) { from(processGatewayOnlyResources) } -listOf( - "intellijPlatformDependency", - "intellijPlatformDependency_integrationTest", - "intellijPluginVerifierIdesDependency", -).forEach { configurationName -> - configurations[configurationName].dependencies.addLater( - toolkitIntelliJ.version().map { - dependencies.create( - group = "com.jetbrains.gateway", - name = "JetBrainsGateway", - version = it, - ) - } - ) -} - dependencies { intellijPlatform { pluginVerifier() @@ -130,14 +113,14 @@ val toolkitInstallationScripts = tasks.register("generateTar") { archiveFileName.set("scripts.tar.gz") compression = Compression.GZIP from("gateway-resources/remote") - // set all files as: - // r-xr-xr-x - fileMode = 0b101101101 + filePermissions { + unix("r-xr-xr-x") + } } val gatewayResourcesDir = tasks.register("gatewayResourcesDir") { from("gateway-resources/caws-proxy-command.bat", toolkitInstallationScripts) - into("$buildDir/$name") + into(layout.buildDirectory.dir(name)) includeEmptyDirs = false } diff --git a/plugins/toolkit/jetbrains-gateway/src/software/aws/toolkits/jetbrains/gateway/connection/workflow/StartBackend.kt b/plugins/toolkit/jetbrains-gateway/src/software/aws/toolkits/jetbrains/gateway/connection/workflow/StartBackend.kt index d24b083a3b2..6a3d47f1b10 100644 --- a/plugins/toolkit/jetbrains-gateway/src/software/aws/toolkits/jetbrains/gateway/connection/workflow/StartBackend.kt +++ b/plugins/toolkit/jetbrains-gateway/src/software/aws/toolkits/jetbrains/gateway/connection/workflow/StartBackend.kt @@ -52,16 +52,18 @@ class StartBackend( LinkedClientManager.getInstance().startNewClient( lifetime, localLink, - URLEncoder.encode(message("caws.workspace.backend.title"), Charsets.UTF_8) - ) { - CodecatalystTelemetry.devEnvironmentWorkflowStatistic( - project = null, - userId = lazilyGetUserId(), - result = TelemetryResult.Succeeded, - duration = System.currentTimeMillis() - start.toDouble(), - codecatalystDevEnvironmentWorkflowStep = "startThinClient", - ) - } + URLEncoder.encode(message("caws.workspace.backend.title"), Charsets.UTF_8), + onStarted = { + CodecatalystTelemetry.devEnvironmentWorkflowStatistic( + project = null, + userId = lazilyGetUserId(), + result = TelemetryResult.Succeeded, + duration = System.currentTimeMillis() - start.toDouble(), + codecatalystDevEnvironmentWorkflowStep = "startThinClient", + ) + }, + enableBeforeRunHooks = true + ) } catch (e: Throwable) { CodecatalystTelemetry.devEnvironmentWorkflowStatistic( project = null, diff --git a/plugins/toolkit/jetbrains-gateway/src/software/aws/toolkits/jetbrains/gateway/welcomescreen/WorkspaceGroupsPanel.kt b/plugins/toolkit/jetbrains-gateway/src/software/aws/toolkits/jetbrains/gateway/welcomescreen/WorkspaceGroupsPanel.kt index 79d04e5b76c..cd4029f251b 100644 --- a/plugins/toolkit/jetbrains-gateway/src/software/aws/toolkits/jetbrains/gateway/welcomescreen/WorkspaceGroupsPanel.kt +++ b/plugins/toolkit/jetbrains-gateway/src/software/aws/toolkits/jetbrains/gateway/welcomescreen/WorkspaceGroupsPanel.kt @@ -138,7 +138,7 @@ class WorkspaceGroupsPanel( gbc.next().anchor(GridBag.WEST) ) - val projectGroups = groupByRepo(workspaces, allRepos).sortedWith(compareBy(Comparator.nullsLast(Comparator.naturalOrder())) { it.repoName }) + val projectGroups = groupByRepo(workspaces, allRepos).sortedWith(compareBy(Comparator.nullsLast(Comparator.naturalOrder())) { it.repoName }) projectGroups.forEachIndexed { index, group -> panel.createWorkspaceGroup(project, group, gbc) diff --git a/plugins/toolkit/jetbrains-rider/build.gradle.kts b/plugins/toolkit/jetbrains-rider/build.gradle.kts index e92ce552736..15ed1b5d501 100644 --- a/plugins/toolkit/jetbrains-rider/build.gradle.kts +++ b/plugins/toolkit/jetbrains-rider/build.gradle.kts @@ -67,6 +67,12 @@ if (providers.gradleProperty("ideProfileName").get() == "2024.3") { } } +configurations { + all { + exclude(group = "com.jetbrains.intellij.spellchecker") + } +} + dependencies { intellijPlatform { localPlugin(project(":plugin-core")) @@ -94,7 +100,7 @@ apply() tasks.register("generateModels") val resharperPluginPath = File(projectDir, "ReSharper.AWS") -val resharperBuildPath = File(project.buildDir, "dotnetBuild") +val resharperBuildPath = layout.buildDirectory.dir("dotnetBuild").get().asFile val resharperParts = listOf( "AWS.Daemon", @@ -257,7 +263,7 @@ val buildReSharperPlugin = tasks.register("buildReSharperPlugin") { "normal", "${resharperPluginPath.canonicalPath}/ReSharper.AWS.sln" ) - exec { + project.providers.exec { executable = "dotnet" args = arguments } @@ -346,11 +352,13 @@ tasks.withType().configureEach { } tasks.integrationTest { + enabled = false // linux: computeSystemScaleFactor "Must be precomputed" systemProperty("hidpi", false) } tasks.test { + enabled = false if (SystemInfo.isWindows) { // extremely flaky filter.excludeTestsMatching("software.aws.toolkits.jetbrains.services.lambda.dotnet.LambdaGutterMarkHighlightingTest*") diff --git a/plugins/toolkit/jetbrains-rider/tst-242-251/software/aws/toolkits/jetbrains/services/lambda/completion/TestAnnotations.kt b/plugins/toolkit/jetbrains-rider/tst-242-251/software/aws/toolkits/jetbrains/services/lambda/completion/TestAnnotations.kt new file mode 100644 index 00000000000..0fdb135ba82 --- /dev/null +++ b/plugins/toolkit/jetbrains-rider/tst-242-251/software/aws/toolkits/jetbrains/services/lambda/completion/TestAnnotations.kt @@ -0,0 +1,12 @@ +// Copyright 2025 Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +package software.aws.toolkits.jetbrains.services.lambda.completion + +import com.jetbrains.rider.test.annotations.TestEnvironment + +@TestEnvironment(solution = "SamHelloWorldApp") +annotation class TestSamHelloWorldApp + +@TestEnvironment(solution = "SamMultipleHandlersApp") +annotation class TestSamMultipleHandlersApp diff --git a/plugins/toolkit/jetbrains-rider/tst-252+/software/aws/toolkits/jetbrains/services/lambda/completion/TestAnnotations.kt b/plugins/toolkit/jetbrains-rider/tst-252+/software/aws/toolkits/jetbrains/services/lambda/completion/TestAnnotations.kt new file mode 100644 index 00000000000..df2e83e212a --- /dev/null +++ b/plugins/toolkit/jetbrains-rider/tst-252+/software/aws/toolkits/jetbrains/services/lambda/completion/TestAnnotations.kt @@ -0,0 +1,15 @@ +// Copyright 2025 Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +package software.aws.toolkits.jetbrains.services.lambda.completion + +import com.jetbrains.rider.test.annotations.Solution +import com.jetbrains.rider.test.annotations.TestEnvironment + +@TestEnvironment +@Solution("SamHelloWorldApp") +annotation class TestSamHelloWorldApp + +@TestEnvironment +@Solution("SamMultipleHandlersApp") +annotation class TestSamMultipleHandlersApp diff --git a/plugins/toolkit/jetbrains-rider/tst/software/aws/toolkits/jetbrains/services/lambda/completion/DotNetHandlerCompletionTest.kt b/plugins/toolkit/jetbrains-rider/tst/software/aws/toolkits/jetbrains/services/lambda/completion/DotNetHandlerCompletionTest.kt index 5aa4eabe51e..4bec8b25a48 100644 --- a/plugins/toolkit/jetbrains-rider/tst/software/aws/toolkits/jetbrains/services/lambda/completion/DotNetHandlerCompletionTest.kt +++ b/plugins/toolkit/jetbrains-rider/tst/software/aws/toolkits/jetbrains/services/lambda/completion/DotNetHandlerCompletionTest.kt @@ -9,7 +9,6 @@ import base.backendStartTimeout import com.intellij.ui.icons.CachedImageIcon import com.jetbrains.rd.ide.model.IconModel import com.jetbrains.rd.ui.icons.toIdeaIcon -import com.jetbrains.rider.test.annotations.TestEnvironment import org.assertj.core.api.Assertions.assertThat import org.testng.annotations.BeforeSuite import org.testng.annotations.Test @@ -29,8 +28,8 @@ class DotNetHandlerCompletionTest : BaseTestWithSolution() { } @Test(description = "Check a single handler is shown in lookup when one is defined in a project.") - @TestEnvironment(solution = "SamHelloWorldApp") - fun testDetermineHandlers_SingleHandler() { + @TestSamHelloWorldApp + fun testDetermineHandlersSingleHandler() { val handlers = DotNetHandlerCompletion().getHandlersFromBackend(project) assertThat(handlers.size).isEqualTo(1) @@ -41,8 +40,8 @@ class DotNetHandlerCompletionTest : BaseTestWithSolution() { // TODO this test only works on 2019.2. Which we don't support anymore. Fix the test // TODO: This test is failing due to handlers detection logic. I assume it need to be fixed if test is correct. @Test(enabled = false, description = "Check all handlers are show in completion lookup when multiple handlers are defined in a project.") - @TestEnvironment(solution = "SamMultipleHandlersApp") - fun testDetermineHandlers_MultipleHandlers() { + @TestSamMultipleHandlersApp + fun testDetermineHandlersMultipleHandlers() { val handlers = DotNetHandlerCompletion().getHandlersFromBackend(project).sortedBy { it.handler } assertThat(handlers.size).isEqualTo(3) diff --git a/plugins/toolkit/jetbrains-ultimate/src/software/aws/toolkits/jetbrains/remoteDev/caws/UpdateWorkspaceSettingsTab.kt b/plugins/toolkit/jetbrains-ultimate/src-242-251/software/aws/toolkits/jetbrains/remoteDev/caws/UpdateWorkspaceSettingsTab.kt similarity index 100% rename from plugins/toolkit/jetbrains-ultimate/src/software/aws/toolkits/jetbrains/remoteDev/caws/UpdateWorkspaceSettingsTab.kt rename to plugins/toolkit/jetbrains-ultimate/src-242-251/software/aws/toolkits/jetbrains/remoteDev/caws/UpdateWorkspaceSettingsTab.kt diff --git a/settings.gradle.kts b/settings.gradle.kts index f644ad6eeff..52648abe640 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -30,7 +30,7 @@ val codeArtifactMavenRepo = fun RepositoryHandler.(): MavenArtifactRepository? { plugins { id("com.github.burrunan.s3-build-cache") version "1.5" id("com.gradle.develocity") version "3.17.6" - id("org.jetbrains.intellij.platform.settings") version "2.3.0" + id("org.jetbrains.intellij.platform.settings") version "2.6.0" } dependencyResolutionManagement { diff --git a/ui-tests/build.gradle.kts b/ui-tests/build.gradle.kts index 4888618c140..d76a512950d 100644 --- a/ui-tests/build.gradle.kts +++ b/ui-tests/build.gradle.kts @@ -45,7 +45,7 @@ tasks.register("uiTestCore") { systemProperty("junit.jupiter.extensions.autodetection.enabled", true) systemProperty("testDataPath", project.rootDir.resolve("testdata").toString()) - systemProperty("testReportPath", project.buildDir.resolve("reports").resolve("tests").resolve("testRecordings").toString()) + systemProperty("testReportPath", layout.buildDirectory.dir("reports/tests/testRecordings").get().asFile.toString()) systemProperty("GRADLE_PROJECT", "sandbox-all") useJUnitPlatform {