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

Missing classes at runtime with forgegradle #14

Closed
baileyholl opened this issue Aug 18, 2022 · 1 comment
Closed

Missing classes at runtime with forgegradle #14

baileyholl opened this issue Aug 18, 2022 · 1 comment

Comments

@baileyholl
Copy link

Hello,
I am sure I am doing something dumb, but I am having trouble getting Mixinextras setup in forge gradle. Ive used normal implementation, implementation with fg.deobf, and shade extending implementation. Unfortunately with all of these, the jar files are missing at runtime, particularly the MixinExtrasBootstrap.init() during the mixinPlugin load, as well as mod constructor.

My branch for adding this project is here: https://github.com/baileyholl/Ars-Nouveau/pull/664/files
Does anything look particularly out of place here?

Thank you!

@baileyholl
Copy link
Author

Apparently forge will not include libraries by default during runtime if they are not marked as a game library.

Ive resolved this by adding the following to the build.gradle

configurations {
    library
}

// Used to manually add non-mc libraries to the runtime classpaths found in build/classpath
// If you have any module issues, check these files to make sure there are no duplicate dependencies
minecraft.runs.all {
    lazyToken('minecraft_classpath') {
        configurations.library.copyRecursive().resolve().collect { it.absolutePath }.join(File.pathSeparator)
    }
}

dependencies {
    minecraft 'net.minecraftforge:forge:1.18.2-40.1.68'
    implementation 'org.jetbrains:annotations:23.0.0'
    shade fg.deobf("com.github.LlamaLad7:MixinExtras:0.0.12")
    library fg.deobf("com.github.LlamaLad7:MixinExtras:0.0.12")
    annotationProcessor("com.github.LlamaLad7:MixinExtras:0.0.12")
...
}

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

Successfully merging a pull request may close this issue.

1 participant