diff --git a/caffeine/build.gradle.kts b/caffeine/build.gradle.kts index aa617a1eeb..30df549013 100644 --- a/caffeine/build.gradle.kts +++ b/caffeine/build.gradle.kts @@ -291,17 +291,20 @@ for (scenario in Scenario.all()) { } } -eclipse.classpath { - plusConfigurations.add(configurations["javaPoetCompileClasspath"]) - - file.whenMerged { - if (this is EclipseClasspath) { - val regex = ".*collections4.*-tests.jar".toRegex() - entries.filterIsInstance() - .filter { regex.matches(it.path) } - .forEach { it.sourcePath = fileReference(file(collections4Sources.asPath)) } +eclipse { + classpath { + plusConfigurations.add(configurations["javaPoetCompileClasspath"]) + + file.whenMerged { + if (this is EclipseClasspath) { + val regex = ".*collections4.*-tests.jar".toRegex() + entries.filterIsInstance() + .filter { regex.matches(it.path) } + .forEach { it.sourcePath = fileReference(file(collections4Sources.asPath)) } + } } } + synchronizationTasks(generateLocalCaches, generateNodes) } idea.module { diff --git a/gradle/plugins/src/main/kotlin/lifecycle/auto-value.caffeine.gradle.kts b/gradle/plugins/src/main/kotlin/lifecycle/auto-value.caffeine.gradle.kts index 17b9d2263f..1a11bd8256 100644 --- a/gradle/plugins/src/main/kotlin/lifecycle/auto-value.caffeine.gradle.kts +++ b/gradle/plugins/src/main/kotlin/lifecycle/auto-value.caffeine.gradle.kts @@ -1,4 +1,5 @@ plugins { + eclipse `java-library` } @@ -14,3 +15,7 @@ dependencies { tasks.named("sourcesJar").configure { dependsOn(tasks.compileJava) } + +eclipse { + synchronizationTasks(tasks.compileJava) +} diff --git a/gradle/plugins/src/main/kotlin/lifecycle/eclipse.caffeine.gradle.kts b/gradle/plugins/src/main/kotlin/lifecycle/eclipse.caffeine.gradle.kts index d7957599ce..a9904899ce 100644 --- a/gradle/plugins/src/main/kotlin/lifecycle/eclipse.caffeine.gradle.kts +++ b/gradle/plugins/src/main/kotlin/lifecycle/eclipse.caffeine.gradle.kts @@ -7,6 +7,7 @@ plugins { val eclipsePreferences by tasks.registering { description = "Generates the Eclipse preferences files." + incompatibleWithConfigurationCache() doFirst { addPreferences("org.eclipse.core.resources.prefs", mapOf( "encoding/" to "UTF-8")) @@ -41,6 +42,7 @@ fun addPreferences(path: String, preferences: Map) { val settings = file(".settings/$path") if (!settings.exists()) { settings.parentFile.mkdirs() + settings.createNewFile() } val updates = preferences + ("eclipse.preferences.version" to "1") val text = settings.readLines() diff --git a/jcache/build.gradle.kts b/jcache/build.gradle.kts index db15dc69e2..667b93625f 100644 --- a/jcache/build.gradle.kts +++ b/jcache/build.gradle.kts @@ -141,11 +141,14 @@ tasks.named("forbiddenApisTest").configure { "jdk-non-portable", "jdk-reflection", "jdk-unsafe")) } -eclipse.classpath.file.whenMerged { - if (this is Classpath) { - val regex = ".*cache-tests.*-tests.jar".toRegex() - entries.filterIsInstance() - .filter { regex.matches(it.path) } - .forEach { it.sourcePath = fileReference(file(jcacheTckSources.asPath)) } +eclipse { + classpath.file.whenMerged { + if (this is Classpath) { + val regex = ".*cache-tests.*-tests.jar".toRegex() + entries.filterIsInstance() + .filter { regex.matches(it.path) } + .forEach { it.sourcePath = fileReference(file(jcacheTckSources.asPath)) } + } } + synchronizationTasks(testResourcesJar) }