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

BuildResult#task(<taskPath>) should have good error message when task path is not absolute #91

Open
1 task
lacasseio opened this issue Mar 21, 2023 · 0 comments
Labels
enhancement New feature or request in:runner-kit

Comments

@lacasseio
Copy link
Member

As a developer using Gradle Runner Kit, I want an accurate error message when the task path is not absolute so I can find the API usage issue easily.

An even better solution would be to make it a compiler error; however, I don't think that would be possible. We could use something like BuildResult#task(String firstTaskPathSegment, String... otherTaskPathSegment), ex: result.task('UpToDateCheck', 'AppDebug'). However, I prefer something else to this. We could model the TaskPath to something like TaskPath.absolute(String path) where the path specified implicitly starts with :. Or at least something that signals to the user the path is absolute (not relative). We should probably start with an internal model and simply convert the specified taskPath into the model, which should take care of the exception handling.

Acceptance Criteria

  • Given a relative task path MyProject:myTask, when calling BuildResult#task an exception should be thrown explaining the specified path is relative (in Gradle terms), and it needs to be absolute.
@lacasseio lacasseio added enhancement New feature or request in:runner-kit labels Mar 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request in:runner-kit
Projects
None yet
Development

No branches or pull requests

1 participant