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

Is gradle incremental build supported? #514

Open
dboreham opened this issue Dec 17, 2021 · 2 comments
Open

Is gradle incremental build supported? #514

dboreham opened this issue Dec 17, 2021 · 2 comments

Comments

@dboreham
Copy link

My expectation is :

./gradlew docker

(builds docker image)

then:

<don't change anything>

Now:

./gradlew docker

(should skip all tasks because nothing changed)

What I see is:

docker container is rebuilt every time ./gradlew docker is run.

Initially I suspected this is as designed, but this issue suggests that incremental build is expected to work: #413

@dboreham
Copy link
Author

Gradle says:

Caching disabled for task ':docker' because:
  Gradle would require more information to cache this task
Task ':docker' is not up-to-date because:
  Task has not declared any outputs despite executing actions.

@ThomGeG
Copy link

ThomGeG commented Jun 22, 2022

Came here wondering the same thing, as I'm in the market for a plugin to simplify my build pipelines.

Looks like the answer is no based on the fact that the project doesn't use the @Input annotation anywhere, most importantly on the getters for all the parameters:

The workaround from #413 would therefore be required unless somebody made a contribution, which may be tricky given how the getters/setters have been setup.


EDIT: On the off-chance a future explorer comes looking, it seems like gradle-docker-plugin supports incremental builds, as it's using the necessary annotations OOTB. I've put it into a project of mine and it's doing a lovely job:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants