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 better support for providing system properties to the Test task #9092
Comments
Maybe we want to make things like providing a single input file property with relative path easier by improving the usage of the Runtime API?
or
We could provide outputs in the same way. |
I was thinking that we may be providing a DSL like this:
The inputFile/Directory would add path sensitivity The arguments for each of those methods would be something we can unpack ( |
Let's do this: test.systemProperties {
add('some.property', inputFile(otherTask.outputFileProvider))
add('some.input.directory', inputDirectory(dir))
add('some.output.file', outputFile(dir))
add('some.output.directory', outputDirectory(dir))
add('some.ignored.file.path', ignored(file))
add('some.value', 'value')
} |
Proposal for the new API: https://docs.google.com/document/d/1BOiXi5Wwkgn_qY_JxfeLs8An5wmiWBfjP4Wu-hIqw8E/edit# |
We are waiting for @adammurdoch input on how to proceed here. |
After some discussion at the world meeting, we should go with a Something along those lines:
|
It should also be much easier to add inconsequential system properties. A common example is setting |
This issue has been automatically marked as stale because it has not had recent activity. Given the limited bandwidth of the team, it will be automatically closed if no further activity occurs. If you're interested in how we try to keep the backlog in a healthy state, please read our blog post on how we refine our backlog. If you feel this is something you could contribute, please have a look at our Contributor Guide. Thank you for your contribution. |
We still want to do this sometime. |
This issue has been automatically marked as stale because it has not had recent activity. Given the limited bandwidth of the team, it will be automatically closed if no further activity occurs. If you're interested in how we try to keep the backlog in a healthy state, please read our blog post on how we refine our backlog. If you feel this is something you could contribute, please have a look at our Contributor Guide. Thank you for your contribution. |
Please pick this up again! We need a way to add any |
@TWiStErRob you can always use a custom CommandLineArgumentProvider to pass a provider as a system property. |
Thanks, that's a good workaround, but with limited use cases: as far as I understand it goes around the |
Once https://github.com/gradle/build-cache/issues/800 is finished we should provide better support for building argument providers which add system properties to e.g. the test task.
Since we actually want to model something (like a java agent) and not add some generic system property with a relative path it could be enough to provide a helper method which converts a
Map<String, Object>
to system property command line arguments.PR: #4709
The text was updated successfully, but these errors were encountered: