Skip to content

Instantly share code, notes, and snippets.

Created Aug 11, 2015
What would you like to do?
build gradle with git and gradle window setup
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="GradleSettings">
<option name="linkedExternalProjectsSettings">
<option name="distributionType" value="DEFAULT_WRAPPED" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="useAutoImport" value="true" />
Copy link

jkschneider commented Aug 12, 2015

Naturally, I would never recommend setting jdkName on an OSS project as that can vary from one machine to another.

Copy link

robfletcher commented Aug 14, 2015

You can set languageLevel = "JDK_1_8" safely, I think.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment