Uploaded image for project: 'Gradle'
  1. Gradle
  2. GRADLE-1209

Use 'sourceSets.main.classesDir' (if present) as the default output dir of the Eclipse classpath

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved
    • Resolution: Fixed
    • Affects Version/s: 0.9
    • Fix Version/s: 0.9-rc-3

      Description

      Currently, the Eclipse classpath always contains 'bin' as the default output folder, even if no files are actually compiled to there (e.g. sourceSets.main is compiled into 'build/classes/main' etc.)

      This means that Eclipse will actually not even create the 'bin' folder, so if this is a Java or JVM project the classpath will contain an entry that does not exist. Whilst this is not uncommon, some tools like Scannotation [1] fall over here.

      The following commit makes the default output dir of the Eclipse classpath an optional parameter to Classpath.groovy. The default value is still 'bin', but if there is a 'main' source set the value 'sourceSets.main.classesDir' is used instead. This should cover Java projects whilst maintaining existing functionality for others.

      https://github.com/demobox/gradle/commit/a5ac21e3ae1e363561a10784fdb0ebafd14681e4

      Please let me know (demobox1 [at] yahoo [dot] co [dot] uk) if a pull request from my fork would be useful.

      @Hans: I've spoken to Adam about this on IRC, so if there are any questions he should know a bit more.

      [1] http://sourceforge.net/projects/scannotation/

        Attachments

          Activity

            People

            Assignee:
            hans_d Hans Dockter
            Reporter:
            demobox Andrew Phillips
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: