Skip to content

Refine optional vs required and default valuesΒ #51

@martinbonnin

Description

@martinbonnin

Description

At the moment, it's not 100% clear how to handle required values.

By default, it outputs an error like this:

* What went wrong:
A problem was found with the configuration of task ':librarianPublishToGcs' (type 'PublishToGcsTask').
  - Type 'com.gradleup.librarian.gradle.internal.task.PublishToGcsTask' property 'credentials' doesn't have a configured value.

But I consider task properties to be mostly implementation details. It's a bit weird to have them leak in the error messages like this.

The alternative is to mark every input nullable and then handle the default in the task action but it's more work for the task action.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions