File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
plugins/ide-plugin/src/main/kotlin/com/github/vlsi/gradle/ide Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ import org.gradle.kotlin.dsl.apply
2828import org.gradle.kotlin.dsl.configure
2929import org.gradle.plugins.ide.eclipse.model.EclipseModel
3030import org.gradle.plugins.ide.idea.model.IdeaModel
31+ import org.gradle.util.GradleVersion
3132import org.jetbrains.gradle.ext.ProjectSettings
3233import java.io.File
3334import java.net.URI
@@ -107,7 +108,12 @@ open class IdeExtension(private val project: Project) {
107108 project.configure<IdeaModel > {
108109 module.generatedSourceDirs.add(generationOutput)
109110 if (sourceSet.name.contains(" test" , ignoreCase = true )) {
110- module.testSourceDirs.add(generationOutput)
111+ if (GradleVersion .current() >= GradleVersion .version(" 7.4" )) {
112+ module.testSources.from(generationOutput)
113+ } else {
114+ @Suppress(" DEPRECATION" )
115+ module.testSourceDirs.add(generationOutput)
116+ }
111117 }
112118 }
113119
You can’t perform that action at this time.
0 commit comments