JetBrains/gradle-idea-ext-plugin

Document setting the module type

baron1405 opened this issue · 1 comments

Issue #21 has been implemented and closed but looking at the Wiki for the project, I do not see any mention of how to set the module type. Please update the documentation.

In the meantime, can you reply to this issue with examples of how to set the module type. I am looking in the source code but it appears you need to specify a source set. I was hoping to just use the plugin in a subproject build.gradle and say something like:

idea {
    module {
        type = 'PYTHON_MODULE'
    }
}

For anyone else coming across this issue, you can set the module type for a subproject using the following DSL syntax:

idea {
    module {
        settings {
            rootModuleType = '<module type>'
        }
    }
}

For example, to specify a Python module:

idea {
    module {
        settings {
            rootModuleType = 'PYTHON_MODULE'
        }
    }
}