Files
openide/plugins/gradle/java/testSources/execution/build/GradleProjectTaskRunnerTest.kt
Sergei Vorobyov ccbae49228 IDEA-356996 fix: don't execute inherited application run configuration in the delegated to Gradle execution mode
All run configurations that can be run in the Gradle delegated mode should implement GradleExecutionEnvironmentProvider. It is already implemented for Micronaut, Ktor and Spring Boot.

GitOrigin-RevId: d4262bd31745f5f908e158d22d7c4e7b0618942f
2024-09-24 17:15:34 +00:00

39 lines
1.5 KiB
Kotlin

// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package org.jetbrains.plugins.gradle.execution.build
import com.intellij.execution.application.ApplicationConfigurationType
import com.intellij.execution.scratch.JavaScratchConfigurationType
import org.gradle.util.GradleVersion
import org.jetbrains.plugins.gradle.testFramework.annotations.BaseGradleVersionSource
import org.junit.jupiter.params.ParameterizedTest
class GradleProjectTaskRunnerTest : GradleProjectTaskRunnerTestCase() {
@ParameterizedTest
@BaseGradleVersionSource
fun `test GradleProjectTaskRunner#canRun with application configuration`(gradleVersion: GradleVersion) {
testEmptyProject(gradleVersion) {
`test GradleProjectTaskRunner#canRun`(
ApplicationConfigurationType.getInstance(),
shouldRunWithModule = true,
shouldRunWithoutModule = false,
shouldBuildWithModule = true,
shouldBuildWithoutModule = false
)
}
}
@ParameterizedTest
@BaseGradleVersionSource
fun `test GradleProjectTaskRunner#canRun with Java scratch configuration`(gradleVersion: GradleVersion) {
testEmptyProject(gradleVersion) {
`test GradleProjectTaskRunner#canRun`(
JavaScratchConfigurationType.getInstance(),
shouldRunWithModule = false,
shouldRunWithoutModule = false,
shouldBuildWithModule = false,
shouldBuildWithoutModule = false
)
}
}
}