Created
August 11, 2015 22:40
-
-
Save danhyun/980319864f75967ccd8a to your computer and use it in GitHub Desktop.
build gradle with git and gradle window setup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"> | |
<GradleProjectSettings> | |
<option name="distributionType" value="DEFAULT_WRAPPED" /> | |
<option name="externalProjectPath" value="$PROJECT_DIR$" /> | |
<option name="useAutoImport" value="true" /> | |
</GradleProjectSettings> | |
</option> | |
</component> | |
''')) | |
} | |
} | |
} | |
} |
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
Naturally, I would never recommend setting jdkName on an OSS project as that can vary from one machine to another.