Is there any way to mark groovy source code as gen...
# intellij
z
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
yes, with the IDEA plugin. Although, from what I recall, it’s not very intuitive
try this
Copy code
// build.gradle.kts

plugins {
  idea
}

idea {
  module {
    generatedSourceDirs.addAll(files(
      "src/main/groovy"
    ))
  }
}