Add support for build-time transforms
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Active
- Tech stack
- java
- Domain
- build-system, tooling
Research direction
Start by tracing ForgeGradle’s existing AccessTransformer and Facade code paths, plus the separate AT Gradle plugin path for non-Minecraft dependencies. Compare their handling of compiled classes with the javac-post-processor plugin, including module-info files, ClassFile API ClassModel, and ASM visitors. Done means a defined build-time transformer API can transform selected mod classes without relying on JDK internals.
Written by the indexing model from the issue text.
Description
Currently FG7 supports AccessTransformers and Facade through dedicated code paths that run against the Minecraft dependency, along with a separate AT Gradle plugin for applying ATs to other dependencies.
I'd like to request the ability to transform my own mod code at build-time, ideally with some kind of API exposed so that anyone can write a build-time transformer to apply to their own mods. The API should give me the original source file, the compiled bytecode (ClassFile API ClassModel?) and a way of changing the bytecode for each class I'm interested in.
There's this plugin as an existing solution, but it doesn't work with module-info files, relies on JDK internals and uses an ASM visitor API which I'm not keen on.
This would make some global runtime transformers unnecessary and expand what mods could do by allowing direct access to JVM-exclusive features.
- Dominant language
- Java
- Stars
- 574
- Forks
- 450
- Avg merge
- 16h 20m
- Merged PRs (30d)
- 1
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from MinecraftForge/ForgeGradle
-
Difficulty 4/5 3-5 days Newbie friendliness 38/100
MinecraftForge/ForgeGradle#1087 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 50/100
MinecraftForge/ForgeGradle#1078 · 3 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 55/100
MinecraftForge/ForgeGradle#1076 ·
-
MinecraftForge/ForgeGradle#1058 · 12 comments · 1 assignee ·
-
Difficulty 3/5 1-2 days Newbie friendliness 42/100
MinecraftForge/ForgeGradle#1057 ·
All issues in MinecraftForge/ForgeGradle
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
infinispan/infinispan#18150 ·
-
area/frontend
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
opensearch-project/k-NN#3597 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100