Fix additional metadata locations with config cache

Previously, a project with a dependency on Spring Boot's configuration
processor would fail to build when the configuration cache is enabled
due to it accessing the Project during task execution.

Instead of accessing the project during task execution, this commit
updates the code to retrieve the resource locations from the matching
source set in advance. The locations are then stored in the action
that configures the compile task when needed.

Closes gh-26880
This commit is contained in:
Andy Wilkinson
2021-06-21 14:08:53 +01:00
parent 66bf0866da
commit e18eb08222
3 changed files with 27 additions and 19 deletions

View File

@@ -31,11 +31,11 @@ import org.springframework.boot.gradle.testkit.GradleBuild;
import static org.assertj.core.api.Assertions.assertThat;
/**
* Integration tests for {@link WarPluginAction}.
* Integration tests for {@link JavaPluginAction}.
*
* @author Andy Wilkinson
*/
@GradleCompatibility
@GradleCompatibility(configurationCache = true)
class JavaPluginActionIntegrationTests {
GradleBuild gradleBuild;