Skip to content

Automatically create gradle/all-projects.txt if not present #114

@veyndan

Description

@veyndan

I'm just trying out the project and thought that this should work:

  1. Apply plugin in settings.gradle.kts
  2. Run ./gradlew :fixAllProjectsList

This failed though with the error:

* What went wrong:
A problem was found with the configuration of task ':fixAllProjectsList' (type 'FixSpotlightProjectListTask').
  - Type 'com.fueledbycaffeine.spotlight.tasks.FixSpotlightProjectListTask' property 'projectsFile$spotlight_gradle_plugin' specifies file '/Users/veyndan.stuart/Development/foo/gradle/all-projects.txt' which doesn't exist.

    Reason: An input file was expected to be present but it doesn't exist.

    Possible solutions:
      1. Make sure the file exists before the task is called.
      2. Make sure that the task which produces the file is declared as an input.

    For more information, please refer to https://docs.gradle.org/9.4.1/userguide/validation_problems.html#input_file_does_not_exist in the Gradle documentation.

BUILD FAILED in 15s
9 actionable tasks: 4 executed, 5 up-to-date

To fix this, I had to run touch gradle/all-projects.txt and then ./gradlew :fixAllProjectsList again. Perhaps ./gradlew :fixAllProjectsList could create a gradle/all-projects.txt if it doesn't already exist, instead of one having to manually create the file?

I get that this is a very minor DX issue, but just thought I'd raise it anyway!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions