add gradle generatedSourceDirs module to main module

Answered

I have the following in my build.gradle:

idea {
    module {
        generatedSourceDirs += file('src/main/generated')
    }
}

 

When syncing gradle with intelliJ, this causes 2 modules to be generated. myProject_generated and myProject_main. Is there a way to only create the myProject_main module with generatedSourceDirs as a source root? Or to include the myProject_generated module as a dependency in myProject_main?

1 comment
Comment actions Permalink

When importing a project, there is an option to create separate modules for source sets, try to disable it.

0

Please sign in to leave a comment.