-
-
Notifications
You must be signed in to change notification settings - Fork 448
Description
Access transformed sources do not attach in IntelliJ IDEA when used with the at-gradle. I've tasked @LexManos to add in AT capabilities into MavenTask in Mavenizer to completely bypass needing to use at-gradle in ForgeGradle 7.
The thing is the following: IntelliJ IDEA simply does not follow Gradle's own dependency resolution when it comes to downloading sources. It does not invoke Gradle with a custom task to download the sources it wants. It uses its own downloaders. In 2025.2, it did use a Gradle init script which added a downloadArtifact_* configuration which I am able to, and in fact do, modify. But with the most recent update in 2025.3, they've decided to go back to using their own Maven sources provider. I don't know why. It could be because the Mavenizer repository is a local file:// repository, but I have no way to tell, even with looking at IntelliJ's own sources.
For now, the workaround is simple. Sync the project using no access transformers, then open any Minecraft class in IntelliJ so that it "downloads" the source jar (since the source jar is next to the main jar in the repository, it automatically attaches it). Then, sync the project again with access transformers. IntelliJ will cache the fact that it already downloaded the sources JAR, so it will use it again with no issues. This is truly, genuinely, the only workaround I could find for this issue.