Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Add a first cut at Eclipse and IntelliJ IDEA project generation from …

…Gradle.
  • Loading branch information...
commit 55a42ab5bc47fd05714b0c8bdd68956b6c368845 1 parent 5981009
Russel Winder russel authored

Showing 2 changed files with 38 additions and 1 deletion. Show diff stats Hide diff stats

  1. +7 1 .gitignore
  2. +31 0 build.gradle
8 .gitignore
@@ -2,7 +2,6 @@
2 2 /artwork/*.png
3 3 /bin/
4 4 /out/
5   -Gant.iws
6 5 .gradle
7 6 /build/
8 7 /gant/
@@ -11,3 +10,10 @@ Gant.iws
11 10 texput.log
12 11 nbbuild.xml
13 12 /nbproject/
  13 +Gant.iws
  14 +Gant.iml
  15 +Gant.ipr
  16 +/.idea/
  17 +.classpath
  18 +.project
  19 +/.settings/
31 build.gradle
@@ -16,6 +16,9 @@
16 16 //
17 17 // Author: Russel Winder <russel@winder.org.uk>
18 18
  19 +apply plugin: 'eclipse'
  20 +apply plugin: 'idea'
  21 +
19 22 import org.apache.tools.ant.filters.ReplaceTokens
20 23
21 24 ext.artifact = 'gant'
@@ -673,3 +676,31 @@ task clobber(description: 'Do a really detailed clean.') << {
673 676 forEachProject{item -> delete item}
674 677 delete buildDir, 'texput.log'
675 678 }
  679 +
  680 +
  681 +idea {
  682 + module {
  683 + excludeDirs += file('gradle/') // Gradle directory including the wrapper subdirectory.
  684 + excludeDirs += file('.gradle/') // Gradle directory
  685 + excludeDirs += file('.settings/') // Eclipse settings directory.
  686 + excludeDirs += file('bin') // Eclipse compilation directory.
  687 + excludeDirs += file('out') // IDEA compilation directory.
  688 + excludeDirs += file('build') // Gradle compilation directory.
  689 + }
  690 + project {
  691 + ext.javaVersion = '1.6'
  692 + ipr {
  693 + withXml { provider ->
  694 + def node = provider.asNode()
  695 + def vcsConfig = node.component.find { it.'@name' == 'VcsDirectoryMappings' }
  696 + vcsConfig.mapping[0].'@vcs' = 'Git'
  697 + def gradleSettings = node.appendNode('component', [name: 'GradleSettings'])
  698 + gradleSettings.appendNode('option', [name: 'SDK_HOME', value: gradle.gradleHomeDir.absolutePath])
  699 + }
  700 + whenMerged { project ->
  701 + project.jdk.languageLevel = 'JDK_1_6'
  702 + }
  703 + }
  704 + }
  705 +}
  706 +

0 comments on commit 55a42ab

Please sign in to comment.
Something went wrong with that request. Please try again.