Skip to content

Binary-stub resource wiring: idiomatic Gradle srcDir(taskProvider) fails to schedule the generator #1860

Description

@wmdietl

An open follow-up task for #1853:

The generated .astub.bin.gz resources are wired into sourceSets.main.resources via a plain-directory srcDir plus an explicit processResources dependsOn and a name-matching configureEach hook for sourcesJar (root build.gradle, subprojects block). Replacing this with the idiomatic srcDir(tasks.named('generateBinaryStubFiles')) — or srcDir(files(dir).builtBy(taskProvider)) — registers the directory but never schedules the generator on Gradle 9.6.1 (with and without the configuration cache): processResources goes UP-TO-DATE and the jars silently ship without any of the ~47 binaries, which then silently fall back to text parsing at runtime. See the revert commit 278a3e3 for the tested evidence.

Follow-up: understand why the lazy wiring drops the producer dependency in this build (Gradle bug? interaction with how our source sets are consumed?) and whether an idiomatic form is possible. Until then the explicit hooks are load-bearing; classpath-presence tests guard against silent rot.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions