Skip to content

Commit f6a5708

Browse files
authored
Work around to be able to generate eclipse projects (#33295)
* Work around to be able to generate eclipse projects gradle/gradle#6582
1 parent a88f878 commit f6a5708

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

build.gradle

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,22 +16,19 @@
1616
* specific language governing permissions and limitations
1717
* under the License.
1818
*/
19+
1920
import com.github.jengelman.gradle.plugins.shadow.ShadowPlugin
21+
import org.apache.tools.ant.taskdefs.condition.Os
2022
import org.elasticsearch.gradle.BuildPlugin
2123
import org.elasticsearch.gradle.LoggedExec
2224
import org.elasticsearch.gradle.Version
2325
import org.elasticsearch.gradle.VersionCollection
2426
import org.elasticsearch.gradle.VersionProperties
2527
import org.elasticsearch.gradle.plugin.PluginBuildPlugin
2628
import org.gradle.plugins.ide.eclipse.model.SourceFolder
27-
import org.gradle.util.GradleVersion
28-
import org.gradle.util.DistributionLocator
29-
import org.apache.tools.ant.taskdefs.condition.Os
30-
import org.apache.tools.ant.filters.ReplaceTokens
3129

3230
import java.nio.file.Files
3331
import java.nio.file.Path
34-
import java.security.MessageDigest
3532

3633
plugins {
3734
id 'com.gradle.build-scan' version '1.13.2'
@@ -512,6 +509,16 @@ allprojects {
512509
tasks.cleanEclipse.dependsOn(wipeEclipseSettings)
513510
// otherwise the eclipse merging is *super confusing*
514511
tasks.eclipse.dependsOn(cleanEclipse, copyEclipseSettings)
512+
513+
// work arround https://github.com/gradle/gradle/issues/6582
514+
tasks.eclipseProject.mustRunAfter tasks.cleanEclipseProject
515+
tasks.matching { it.name == 'eclipseClasspath' }.all {
516+
it.mustRunAfter { tasks.cleanEclipseClasspath }
517+
}
518+
tasks.matching { it.name == 'eclipseJdt' }.all {
519+
it.mustRunAfter { tasks.cleanEclipseJdt }
520+
}
521+
tasks.copyEclipseSettings.mustRunAfter tasks.wipeEclipseSettings
515522
}
516523

517524
allprojects {

0 commit comments

Comments
 (0)