From 76a12d3bed2049548dd39e63566673cc3c83044b Mon Sep 17 00:00:00 2001 From: Nikita Barkov Date: Tue, 26 Mar 2024 10:33:26 +0100 Subject: [PATCH] [perf_tests]AT-816. Implemented createSpringProjectCommand in spring-initializr plugin GitOrigin-RevId: b36ff31ee4e83afb7595016677e51aa7a8db6df0 --- .../ide/performanceTesting/commands/dto/BuildType.kt | 6 ++++++ .../commands/dto/NewSpringProjectDto.kt | 11 +++++++++++ .../commands/generalCommandChain.kt | 5 +++++ 3 files changed, 22 insertions(+) create mode 100644 plugins/performanceTesting/commands-model/src/com/intellij/tools/ide/performanceTesting/commands/dto/BuildType.kt create mode 100644 plugins/performanceTesting/commands-model/src/com/intellij/tools/ide/performanceTesting/commands/dto/NewSpringProjectDto.kt diff --git a/plugins/performanceTesting/commands-model/src/com/intellij/tools/ide/performanceTesting/commands/dto/BuildType.kt b/plugins/performanceTesting/commands-model/src/com/intellij/tools/ide/performanceTesting/commands/dto/BuildType.kt new file mode 100644 index 000000000000..2a99930a7ed8 --- /dev/null +++ b/plugins/performanceTesting/commands-model/src/com/intellij/tools/ide/performanceTesting/commands/dto/BuildType.kt @@ -0,0 +1,6 @@ +package com.intellij.tools.ide.performanceTesting.commands.dto + +enum class BuildType { + MAVEN, + GRADLE +} \ No newline at end of file diff --git a/plugins/performanceTesting/commands-model/src/com/intellij/tools/ide/performanceTesting/commands/dto/NewSpringProjectDto.kt b/plugins/performanceTesting/commands-model/src/com/intellij/tools/ide/performanceTesting/commands/dto/NewSpringProjectDto.kt new file mode 100644 index 000000000000..4f92edd9d409 --- /dev/null +++ b/plugins/performanceTesting/commands-model/src/com/intellij/tools/ide/performanceTesting/commands/dto/NewSpringProjectDto.kt @@ -0,0 +1,11 @@ +package com.intellij.tools.ide.performanceTesting.commands.dto + +import com.intellij.tools.ide.performanceTesting.commands.SdkObject +import java.io.Serializable + +data class NewSpringProjectDto( + val projectName: String, + val buildType: BuildType, + val frameworkVersion: String, + val sdkObject: SdkObject? = null +) : Serializable diff --git a/plugins/performanceTesting/commands-model/src/com/intellij/tools/ide/performanceTesting/commands/generalCommandChain.kt b/plugins/performanceTesting/commands-model/src/com/intellij/tools/ide/performanceTesting/commands/generalCommandChain.kt index d2a749c1d4da..7eed83e5b367 100644 --- a/plugins/performanceTesting/commands-model/src/com/intellij/tools/ide/performanceTesting/commands/generalCommandChain.kt +++ b/plugins/performanceTesting/commands-model/src/com/intellij/tools/ide/performanceTesting/commands/generalCommandChain.kt @@ -619,6 +619,11 @@ fun T.createGradleProject(newGradleProjectDto: NewGradleProje addCommand("${CMD_PREFIX}createGradleProject $options") } +fun T.createSpringProject(newMavenProjectDto: NewSpringProjectDto): T = apply { + val options = objectMapper.writeValueAsString(newMavenProjectDto) + addCommand("${CMD_PREFIX}createSpringProject $options") +} + fun T.updateMavenGoal(settings: MavenGoalConfigurationDto): T = apply { val options = objectMapper.writeValueAsString(settings) addCommand("${CMD_PREFIX}updateMavenGoal $options")