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

add support for incremental Gradle builds #150

Open
vorburger opened this issue May 1, 2018 · 2 comments
Open

add support for incremental Gradle builds #150

vorburger opened this issue May 1, 2018 · 2 comments

Comments

@vorburger
Copy link
Collaborator

Once the base #118 (#121) is in, I'll follow-up on it to add support for --incremental Gradle builds.

I'll have to find a way to make Gradle write everything we want to preserve into ${S2I_ARTIFACTS_DIR}/gradle, which I've already used in the final clean-up commit of #121 for GRADLE_CLEAR_REPO.

We'll then also have to make java/templates/s2i/save-artifacts include that in the TAR (how, together with m2?), and I'm guessing somewhere "restore" it - @rhuss where does that happen?

I can then test this with the new test.sh (just manually unfortunately; I don't see how to reasonably easily automatically cover this...) and observe that the 2nd incremental Gradle run is not re-downloading anymore, and that the 2nd Maven incremental run still not re-downloading (as it currently, just to verify non-regression).

@vorburger
Copy link
Collaborator Author

find a way to make Gradle write everything we want to preserve into ...

in #118 I had envisioned this to be:

--gradle-user-home=${S2I_ARTIFACTS_DIR}/gradle-home 
--project-cache-dir=${S2I_ARTIFACTS_DIR}/gradle-project-cache

but based on above I'll probably instead make it:

--gradle-user-home=${S2I_ARTIFACTS_DIR}/gradle/user-home 
--project-cache-dir=${S2I_ARTIFACTS_DIR}/gradle/project-cache

#118 also mentions:

BTW incremental builds with Gradle should be blazingly fast, not only avoiding dependency re-downloads, but truly incrementallying building code changes themselves

but I now realized that would require to save-artifacts and restore of ALL build/ (sub?!?) directories... that's likely more complicated than I could be bothered for at this stage, and so is not a goal of this #118 follow-up issue, anymore. Saving the re-download of depenencies from external repositories is a great first step, already.

@rhuss
Copy link
Contributor

rhuss commented May 9, 2018

@vorburger hey, just a quick note: I'm at Red Hat and jump onto the s2i images at the beginning of next week. sorry for the delay ...

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