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

Improve Gradle build cacheability #5188

Merged

Conversation

jprinet
Copy link
Contributor

@jprinet jprinet commented Mar 29, 2022

No description provided.

build.gradle Outdated

@Override
Iterable<String> asArguments() {
def args = []
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
def args = []
return [srcDirs.collect { it.absolutePath }, "-d", outputDir.absolutePath, "-f", "generateDelombokComment:skip"]

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all good with a join() 👍

build.gradle Outdated
Iterable<String> asArguments() {
def args = []
args.addAll(srcDirs.collect { it.absolutePath })
args.addAll(["-d", outputDir.absolutePath, "-f", "generateDelombokComment:skip"])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we also be declaring the output directory?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The output is already declared in the task configuration:

outputs.dir(outputDir)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Eventually that's a good point @runningcode, I'll move the task inputs/outputs declaration inside the CommandLineArgumentProvider

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done!

@jprinet jprinet force-pushed the feature/improve_gradle_cacheability branch from d2572b0 to 901e898 Compare March 29, 2022 09:53
@jprinet jprinet force-pushed the feature/improve_gradle_cacheability branch from 901e898 to e7000d7 Compare March 29, 2022 09:55
build.gradle Outdated Show resolved Hide resolved
Copy link
Member

@kiview kiview left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great, thanks a lot for the contribution 🙌

Copy link
Member

@bsideup bsideup left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you so much! This will help a lot 💯

@kiview kiview merged commit 04ecb68 into testcontainers:master Mar 30, 2022
@kiview kiview added this to the next milestone Mar 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants