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
28
28
import org.gradle.kotlin.dsl.configure
29
29
import org.gradle.plugins.ide.eclipse.model.EclipseModel
30
30
import org.gradle.plugins.ide.idea.model.IdeaModel
31
+ import org.gradle.util.GradleVersion
31
32
import org.jetbrains.gradle.ext.ProjectSettings
32
33
import java.io.File
33
34
import java.net.URI
@@ -107,7 +108,12 @@ open class IdeExtension(private val project: Project) {
107
108
project.configure<IdeaModel > {
108
109
module.generatedSourceDirs.add(generationOutput)
109
110
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
+ }
111
117
}
112
118
}
113
119
You can’t perform that action at this time.
0 commit comments