Is there any way to mark groovy source code as generated so that it is not editable by the IDE?
Copy code
plugins {
groovy
id("kotlin")
}
val fileCollectionSource: ConfigurableFileCollection = objects.fileCollection()
fileCollectionSource
.from(sharedGroovyModifiedSourceDir)
.builtBy(modifySharedGroovyTask)
sharedGroovySource.srcDir(fileCollectionSource)
sourceSets {
main {
groovy {
// I do not want this source to be "editable" by the IDE
source(sharedGroovySource)
}
}
}
a
Adam S
04/25/2023, 8:54 PM
yes, with the IDEA plugin. Although, from what I recall, it’s not very intuitive
Adam S
04/25/2023, 8:56 PM
try this
Copy code
// build.gradle.kts
plugins {
idea
}
idea {
module {
generatedSourceDirs.addAll(files(
"src/main/groovy"
))
}
}