Home > database >  Gradle DSL - Eclipse Equivalent for IDEA Module Property
Gradle DSL - Eclipse Equivalent for IDEA Module Property

Time:03-10

Good localtime,

I am in the process of updating legacy (4.8.1) Gradle build files for a big-McLarge-huge, multimodule project. We utilize an intellij.gradle file which has the following line (marked by comment):

idea {
    module {
        inheritOutputDirs = true // <-- HOW DO I DO THIS
        downloadJavadoc = true
        downloadSources = true
    }

    workspace.iws.withXml { provider ->
        def node = provider.asNode()
        def dynamicClasspath = node.component.find { it."@name" == "dynamic.classpath" }
        if (dynamicClasspath != null) {
            dynamicClasspath."@value" = "true"
    }
}

From the 4.8.1 DSL docs:

If true, output directories for this module will be located below the output directory for the project; otherwise, they will be set to the directories specified by IdeaModule.getOutputDir() and IdeaModule.getTestOutputDir().

Any ideas on what the Eclipse DSL equivalent of inheritOutputDirs? Should this be handled using the eclipseClasspath API? Right now everything is building fine, but the Eclipse Java builder is is flagging things.

References:

  • Related