Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement interface injections #33

Merged
merged 5 commits into from
Jul 5, 2024
Merged

Implement interface injections #33

merged 5 commits into from
Jul 5, 2024

Conversation

Matyrobbrt
Copy link
Member

@Matyrobbrt Matyrobbrt commented Jul 5, 2024

Adds a new plugin that can be used to inject interfaces to classes, creating stubs for recomp.

The JSON syntax is quite simple:

{
  "className": ["interface1", "interface2"]
}

The class names are in the format of com/some/package/Outer$Inner.

Generics are supported, as they'll be pasted verbatim.

A TYPE_USE annotation marker may be added to the classes, for eventual runtime validation that something will inject that interface in prod.

@Matyrobbrt Matyrobbrt added enhancement New feature or request new plugin This request is for a new JST plugin labels Jul 5, 2024
@neoforged-pr-publishing
Copy link

neoforged-pr-publishing bot commented Jul 5, 2024

  • Publish PR to GitHub Packages

Last commit published: e6b2af8880ad69df47853162340e1b192bbe7ed3.

PR Publishing

The artifacts published by this PR:

Repository Declaration

In order to use the artifacts published by the PR, add the following repository to your buildscript:

repositories {
    maven {
        name 'Maven for PR #33' // https://github.com/neoforged/JavaSourceTransformer/pull/33
        url 'https://prmaven.neoforged.net/JavaSourceTransformer/pr33'
        content {
            includeModule('net.neoforged.jst', 'jst-cli')
            includeModule('net.neoforged.jst', 'jst-cli-bundle')
        }
    }
}

@Matyrobbrt Matyrobbrt requested a review from shartte July 5, 2024 11:16
@shartte shartte self-requested a review July 5, 2024 21:27
@shartte shartte merged commit 78b8c0a into main Jul 5, 2024
2 checks passed
@shartte shartte deleted the iface-injection branch July 5, 2024 21:28
shartte added a commit to neoforged/NeoFormRuntime that referenced this pull request Jul 5, 2024
See neoforged/JavaSourceTransformer#33

Adds a new `--interface-injection-data` parameter used to specify the
location of interface injection data files.

---------

Co-authored-by: Sebastian Hartte <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request new plugin This request is for a new JST plugin
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants