If you still haven’t found a solution, you can try to manipulate the .classpath file directly.
-
Solution 1
eclipse { classpath { file { whenMerged {
def specialSource = entries.find { it.path =“sourceFolder” }
specialSource .setOutput(“outputRelativePath”)
}}}} -
Solution 2
eclipse { classpath { file { whenMerged {
def specialSource = new org.gradle.plugins.ide.eclipse.model.SourceFolder(“sourceFolder”,“outputRelativePath”)
entries += specialSource
}}}}
(In solution 2 you use the second constructor for a new classpath entry and directly create one (entry) of: kind=“src”, output = “outputRelativePath” and path = “sourceFolder”. Afterwards, you can add any other desired attributes. This worked for me when I was trying to add a certain attribute to an output folder)