Configuring the IntelliJ args compiler in Gradle

I need to add a -parametersjava compiler option for successful tests. I can do this in gradle already for ./gradlew buildwork or manually by adding -parametersto IntelliJ Settings > Build.. > Compiler > Java Compiler > Additional command line parameters:so that they work in the IDE, but I do not want everyone who checks this repo to do the manual step.

Is .iprdisplayed in my file

<component name="JavacSettings"> <option name="ADDITIONAL_OPTIONS_STRING" value="-parameters" /> </component>

after installing it manually, but is it possible to configure the idea plugin in gradle, so it ./gradlew ideajust does all the work?

+4
source share
1 answer

ipr XML node. , :

idea.project.ipr {
    withXml { provider ->
        provider.node.component
                .find { it.@name == 'VcsDirectoryMappings' }
                .mapping.@vcs = 'Git'
    }
}

IDEA ( .idea).

0

Source: https://habr.com/ru/post/1672771/


All Articles