-
Notifications
You must be signed in to change notification settings - Fork 135
./gradlew test -Drecreate=true #1220
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
Conversation
Generate changelog in
|
| // ./gradlew test -Drecreate=true | ||
| String shouldRecreate = System.getProperty("recreate", "false"); | ||
| task.systemProperty("recreate", shouldRecreate); | ||
| task.getInputs().property("recreate", shouldRecreate); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be be defensive and disable caching when shouldRecreate=true?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We may want to require/force boolean values here, possibly Boolean.getBoolean("recreate") and use the string value for the sysprop+input?
dc09fe3 to
bc64724
Compare
|
Its seems slightly out of scope for baseline to handle this convention and the upside for adding this is pretty low since in the worst case things will fail at CI time |
|
The reason to put this in a common place is that we keep copy pasting a chunk of gradle to help us do this, and we'd rather do away with the duplication. |
|
@ferozco I mean we have quite a diverse chunk of functionality in baseline already, stuff to give us reproducibility, compilation fixes, circleci. While it's a bit weird, I think it's in line with the overall goal of trying to minimise floating blobs of identical gradle across projects (especially when you find a bug in one of them!). |
|
👍 |
Before this PR
A number of our repos use the
./gradlew test -Drecreate=truepattern, but I recently found (on our circle-templates repo) that we've been doing it wrong the entire time. Specifically, the task short-circuits and doesn't run when there are no code changes, even though the behaviour should be different when-Drecreate=trueis passed in.After this PR
==COMMIT_MSG==
For repos that use snapshot-style testing,
./gradlew test -Drecreate=truewill ensure the"recreate"system property is passed through to Java correctly.==COMMIT_MSG==
Possible downsides?