apply plugin: "idea"

idea {
    project {
        jdkName "1.8"
        languageLevel "1.8"
        ipr {
            withXml { provider ->
                def node = provider.asNode()
                node.component.find { it.'@name' == 'VcsDirectoryMappings' }?.mapping[0].'@vcs' = 'Git'

                node.append(new XmlParser().parseText('''
                    <component name="InspectionProjectProfileManager">
                        <profile version="1.0">
                          <option name="myName" value="Project Default" />
                          <option name="myLocal" value="true" />
                          <inspection_tool class="LoggerInitializedWithForeignClass" enabled="false" level="WARNING" enabled_by_default="false">
                            <option name="loggerClassName" value="org.apache.log4j.Logger,org.slf4j.LoggerFactory,org.apache.commons.logging.LogFactory,java.util.logging.Logger" />
                            <option name="loggerFactoryMethodName" value="getLogger,getLogger,getLog,getLogger" />
                          </inspection_tool>
                          <inspection_tool class="SpellCheckingInspection" enabled="false" level="TYPO" enabled_by_default="false">
                            <option name="processCode" value="true" />
                            <option name="processLiterals" value="true" />
                            <option name="processComments" value="true" />
                          </inspection_tool>
                        </profile>
                        <option name="PROJECT_PROFILE" value="Project Default" />
                        <option name="USE_PROJECT_PROFILE" value="true" />
                        <version value="1.0" />
                    </component>
                '''))
            }
        }
    }
}