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

Error when generating javadoc #156

Open
MerchantPug opened this issue Sep 9, 2024 · 3 comments
Open

Error when generating javadoc #156

MerchantPug opened this issue Sep 9, 2024 · 3 comments

Comments

@MerchantPug
Copy link

Hi, I'm getting an error whenever I generate the javadocs through the ./gradlew build command.
I think it's being caused by not having access to certain NeoForge classes when trying to use the Shearable interface on an entity (I do know that this interface is deprecated, and I'll see if changing to IShearable is worth it).

Below are some debug logs that might lead to the issue.

2024-09-09T16:21:43.729+1000 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] FAILURE: Build failed with an exception.
2024-09-09T16:21:43.730+1000 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] 
2024-09-09T16:21:43.730+1000 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * What went wrong:
2024-09-09T16:21:43.730+1000 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Execution failed for task ':neoforge:javadoc'.
2024-09-09T16:21:43.730+1000 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] > Javadoc generation failed. Generated Javadoc options file (useful for troubleshooting): 
2024-09-09T16:21:42.771+1000 [ERROR] [system.err] C:\Users\User\Desktop\Programs\MCMods\bovines-and-buttercups\neoforge\build\moddev\artifacts\neoforge-21.1.45-minecraft-merged.jar(/net/minecraft/world/entity/Shearable.java):20: error: reference not found
2024-09-09T16:21:42.771+1000 [ERROR] [system.err]      * @deprecated Neo: Use {@link net.neoforged.neoforge.common.IShearable#isShearable(net.minecraft.world.item.ItemStack, net.minecraft.world.level.Level, net.minecraft.core.BlockPos)} instead.
2024-09-09T16:21:42.771+1000 [ERROR] [system.err]                                    ^
2024-09-09T16:21:42.776+1000 [ERROR] [system.err] C:\Users\User\Desktop\Programs\MCMods\bovines-and-buttercups\neoforge\build\moddev\artifacts\neoforge-21.1.45-minecraft-merged.jar(/net/minecraft/world/entity/Shearable.java):11: error: reference not found
2024-09-09T16:21:42.776+1000 [ERROR] [system.err]      * @deprecated Neo: Use {@link net.neoforged.neoforge.common.IShearable#onSheared(
2024-09-09T16:21:42.776+1000 [ERROR] [system.err]                                    ^
2024-09-09T16:21:43.559+1000 [ERROR] [system.err] 2 errors
2024-09-09T16:21:43.560+1000 [ERROR] [system.err] 100 warnings
@MerchantPug
Copy link
Author

MerchantPug commented Sep 9, 2024

I have fixed this by changing to IShearable, but I think it's an issue with javadoc generation not getting NeoForge dependencies, so link annotations to NeoForge classes fail.

@shartte
Copy link
Collaborator

shartte commented Sep 9, 2024

I have not yet validated this, but just by looking at the Gradle code, javadoc should use the main source-set compile classpath by default.

Can you please post a link to your project?

@MerchantPug
Copy link
Author

I'll post the repo at a specific commit hash, because I changed the implementation to IShearable.
https://github.com/GreenhouseModding/bovines-and-buttercups/tree/6ef2825b1a8ee083bf93439543ed598bae865eef

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants