Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BootBuildImage's archiveFile property is annotated as an @Input but should be annotated as an @InputFile #32495

Closed
juergenzimmermann opened this issue Sep 25, 2022 · 3 comments
Assignees
Labels
type: bug A general bug
Milestone

Comments

@juergenzimmermann
Copy link

In a project with Spring Boot 3.0.0-M5 I tried to upgrade from Gradle 7.5.1 to 8.0.0-milestone-1, but got this error message:

* What went wrong:
A problem was found with the configuration of task ':bootBuildImage' (type 'BootBuildImage').
  - In plugin 'org.springframework.boot' type 'org.springframework.boot.gradle.tasks.bundling.BootBuildImage' property 'archiveFile' has @Input annotation used on property of type 'RegularFileProperty'.

    Reason: A property of type 'RegularFileProperty' annotated with @Input cannot determine how to interpret the file.

    Possible solutions:
      1. Annotate with @InputFile for regular files.
      2. Annotate with @InputFiles for collections of files.
      3. If you want to track the path, return File.absolutePath as a String and keep @Input.

    Please refer to https://docs.gradle.org/8.0-milestone-1/userguide/validation_problems.html#incorrect_use_of_input_annotation for more details about this problem.
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Sep 25, 2022
@snicoll
Copy link
Member

snicoll commented Sep 26, 2022

Thanks for the report but we are aware that our plugin might not work with a milestone of the next Gradle's generation. We are monitoring this and working with the Gradle team so I am going to close this now. We'll work on this in due course.

@snicoll snicoll closed this as not planned Won't fix, can't repro, duplicate, stale Sep 26, 2022
@snicoll snicoll added status: declined A suggestion or change that we don't feel we should currently apply and removed status: waiting-for-triage An issue we've not yet triaged labels Sep 26, 2022
@wilkinsona
Copy link
Member

@juergenzimmermann Thanks for trying out Boot's plugin with Gradle 8.0.0-milestone-1. We don't yet support Gradle 8.0 and haven't started testing against it so some incompatibilities are to be expected. It looks as if Gradle 8.0 won't be available until after Spring Boot 3.0.0-RC1 so, depending on the scope of changes that are required to support 8.0, we may not be able to do so until Boot 3.1. In the meantime, we can fix the specific problem that you've reported as the annotation on the archiveFile property is incorrect with earlier versions of Gradle too.

@wilkinsona wilkinsona reopened this Sep 26, 2022
@wilkinsona wilkinsona changed the title Gradle plugin 'org.springframework.boot' incompatible with Gradle 8.0.0-milestone-1 BootBuildImage's archiveFile property as annotated as an @Input but should be annotated as an @InputFile Sep 26, 2022
@wilkinsona wilkinsona added type: bug A general bug and removed status: declined A suggestion or change that we don't feel we should currently apply labels Sep 26, 2022
@wilkinsona wilkinsona added this to the 2.6.x milestone Sep 26, 2022
@juergenzimmermann
Copy link
Author

@wilkinsona Thank you for the commenting the circumstances. When you have a fix regarding @InputFile. I can test it with my projects. BTW, compiling Kotlin code and also using tools like ktlint, detekt, Dokka are working fine with the 1st milestone of Gradle 8.0.

@wilkinsona wilkinsona changed the title BootBuildImage's archiveFile property as annotated as an @Input but should be annotated as an @InputFile BootBuildImage's archiveFile property is annotated as an @Input but should be annotated as an @InputFile Sep 26, 2022
@wilkinsona wilkinsona modified the milestones: 2.6.x, 2.6.13 Sep 26, 2022
@wilkinsona wilkinsona self-assigned this Sep 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A general bug
Projects
None yet
Development

No branches or pull requests

4 participants