Don't understand why a task runs

I have a custom task with inputs and outputs set as below

    inputs.files(fileTree("projects").exclude("d:/dev/project/HtmlClient/projects/app/src/setup.js"),
        "package.json",
        "package-lock.json",
        "angular.json",
        "tsconfig.json",
        "tsconfig.app.json")
    outputs.dir("dist")

After I execute the task when I execute it again (with Gradle info turned on) I get this reason for executing the task:

Input property '$1' file d:\dev\project\HtmlClient\projects\app\src\setup.js has changed.

I thought I was explicitly excluding this file yet it is the reason the task is executed?

exclude uses ant like pattern syntax: PatternFilterable (Gradle API 8.10.2)
TLDR:

exclude("app/src/setup.js"),

is probably what you are after