Skip to content

Find an alternative to 'registering' a custom AbstractArtifactRepository #624

@Aaron1011

Description

@Aaron1011

Currently, ForgeGradle (through Artifactural) 'registers' a custom AbstractArtifactRepository with Gradle. This a huge hack - Gradle does not support registering custom artifact repositories, which requires us to use a combination of reflection and internal Gradle apis.

This has the effect of tying all users of ForgeGradle to a specific minor (or even point) release of Gradle. Upgrading Gradle becomes very difficult, as there's no guarantee that ForgeGradle will work at all.

This problem is only going to get worse over time. Since Artifactural is using internal Gradle APIs, Gradle is free to change those APIs at any time. We've already dealt with this once - a change to a constructor signature required a horrible build-time bytecode hack in order to a produce a ForgeGradle jar compatible with multiple versions of Gradle. As new versions of Gradle are released, ForgeGradle will need to choose between dropping support for old minor (or even patch!) releases, or adding even more version-specific hacks to hold things together.

We should investigate officially supported alternatives to the current custom artifact repository hack. If acceptable solutions exist, I will try to write up a Gradle feature request describing the changes that would be necessary.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FG6This request is for FG 6won't fixIssue is not a real issue or not something worth fixing

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions