Skip to content

Gradle Plugin incompatible with the gradle Configuration Cache #166

@harryjackson

Description

@harryjackson

Describe the bug

When trying to use the following version

implementation("org.springdoc:springdoc-openapi-starter-webmvc-ui:2.8.12")

and running the command

./gradlew clean test build --configuration-cache

I get the following errors

3 problems were found storing the configuration cache.
- Task `:service:forkedSpringBootRun` of type `com.github.psxpaul.task.JavaExecFork`: cannot serialize object of type 'org.springdoc.openapi.gradle.plugin.OpenApiGeneratorTask', a subtype of 'org.gradle.api.Task', as these are not supported with the configuration cache.
  See https://docs.gradle.org/9.0.0/userguide/configuration_cache_requirements.html#config_cache:requirements:task_access
- Task `:service:forkedSpringBootRun` of type `com.github.psxpaul.task.JavaExecFork`: cannot serialize object of type 'org.springframework.boot.gradle.tasks.run.BootRun', a subtype of 'org.gradle.api.Task', as these are not supported with the configuration cache.
  See https://docs.gradle.org/9.0.0/userguide/configuration_cache_requirements.html#config_cache:requirements:task_access
- Task `:service:forkedSpringBootStop` of type `com.github.psxpaul.task.ExecJoin`: cannot serialize object of type 'com.github.psxpaul.task.JavaExecFork', a subtype of 'org.gradle.api.Task', as these are not supported with the configuration cache.
  See https://docs.gradle.org/9.0.0/userguide/configuration_cache_requirements.html#config_cache:requirements:task_access
  • If you are reporting a bug, please help to speed up problem diagnosis by providing as
    much information as possible:
  • A clear and concise description of what the bug is: the title of an issue is not enough

To Reproduce

Using Gradle 9.0.0

add the following dependency

    implementation("org.springdoc:springdoc-openapi-starter-webmvc-ui:2.8.12")

Add a Configuration class

@OpenAPIDefinition(info = @Info(title = "Tools service", version = "v1"), servers = {
    @Server(
        url = "{baseIntegrationToolsUrl}"
    )
})
@Configuration
public class ToolsConfiguration {

}

Run the command

./gradlew clean test build --configuration-cache
  • What version of spring-boot you are using?

org.springframework.boot:spring-boot-starter-web:3.4.6

  • What modules and versions of springdoc-openapi are you using?
 implementation("org.springdoc:springdoc-openapi-starter-webmvc-ui:2.8.12")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions