Closed marcospereira closed 9 months ago
@casid, I'm trying to figure out how to add a test for this, though.
All modified and coverable lines are covered by tests :white_check_mark:
Comparison is base (
241efe8
) 91.21% compared to head (5170ff2
) 91.15%.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
I don't have time to have a detailed look, but I skimmed through and it seems good.
I don't have time to have a detailed look, but I skimmed through and it seems good.
Yeah, I'm trying to understand why the tests Work On My Machine™ but not on CI.
Hum, it seems things are... broken(?) somehow. From this run: https://github.com/casid/jte/actions/runs/6748107408/job/18345752283?pr=295#step:6:479
> Task :publishToMavenLocal
Skipping task ':publishToMavenLocal' as it has no actions.
🤔
Unfortunately, I'm not really a gradle expert, so I can't help much with this. :-(
Unfortunately, I'm not really a gradle expert, so I can't help much with this. :-(
No worries. I was able to figure out how to properly test the tasks when the build-cache is involved.
I think this is good to review/merge. 🚀
@casid @edward3h build is green, and this is good to be reviewed. :)
LGTM, would wait a few more days with the merge, so that @edward3h might have a chance to look at it.
I'm busy this weekend, but I can take a look on Monday.
I am happy with this change. Thanks @marcospereira !
I am happy with this change. Thanks @marcospereira !
Awesome! Thanks for taking the time to review, @edward3h.
@casid, I guess this is good to merge/release then. 🍾
Thanks everyone!
Hey @casid, just a quick check about when we can have a release with these changes. 🚀
@marcospereira I just released version 3.1.5 :-)
What?
Gradle has a build cache that can be used to speed up the build process. From Gradle docs:
I noticed that the build cache for the
compileKotlin
task was not working when using jte'sgenerate
orprecompile
, because the inputs generated by those tasks were not cached. Therefore, the generated code would be considered new input forcompileKotlin
, meaning the task cannot use the build cache. I suspect the same applies tocompileJava
, but I didn't check.Local validation
Comparison when running the
compileKotlin
task with and without-Dorg.gradle.caching=true
.Before
Running with
--build-cache
multiple times has no effect since the cache is always stale:After
With no cache (
--warning-mode=none
for brevity):With a populated build-cache (notice the
FROM-CACHE
):Let's see the effect on
testClasses
after running the command above:And then, since the build cache was populated: