Skip to content

Commit

Permalink
Fix Eclipse integration to pick up plugin generated descriptors
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex-Vol-SV committed Jul 21, 2020
1 parent 9b7c110 commit e68223a
Showing 1 changed file with 7 additions and 12 deletions.
19 changes: 7 additions & 12 deletions build.gradle
Expand Up @@ -111,16 +111,6 @@ eclipse {
downloadSources = true
downloadJavadoc = true

// This is a weird requirement that I think is fixed when
// we upgrade to the latest Gradle and the plugin tools.
sourceSets {
main {
resources {
srcDirs += "build/resources/main"
}
}
}

// This makes the Gradle paths and Eclipse paths align so
// that we have a working workspace from the start.
file {
Expand All @@ -133,10 +123,15 @@ eclipse {
case ~'src/test/groovy':
entry.output = "build/classes/groovy/test"
break
case ~"build/resources/main":
entry.output = null
}
}
def src = new org.gradle.plugins.ide.eclipse.model.SourceFolder("build/resources/main", null)
src.getEntryAttributes().put("gradle_scope", "main")
src.getEntryAttributes().put("gradle_used_by_scope", "main,test")
classpath.entries << src
classpath.entries.unique(true) {
(it instanceof org.gradle.plugins.ide.eclipse.model.ProjectDependency) ? it.path : it
}
}
}
}
Expand Down

0 comments on commit e68223a

Please sign in to comment.