question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

maven-publish: using loom, components.java exposes way too many dependencies

See original GitHub issue

Currently, just dropping maven-publish into a fabric gradle project creates a crazed pom with literally every dependency of minecraft, plus fabric, plus every modCompile. The input to maven-publish is usually components.java, and that is generally the only component that ever exists.

Right now there’s a workaround involving going into the xml and literally deleting the dependencies node, but this… isn’t ideal.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:10 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
NikkyAIcommented, Dec 30, 2018

you would want dependencies on other mods to go in but not loader generally… unless you jsut go ahead and include which version of fabric-loader you used as a dependency and whoever consumes the library will use that version unless they specify their own version of fabric-loader

i would also support a configuration modApi or apiMod that is modCompile and goes into the dependencies component

1reaction
Mordnacommented, Mar 10, 2019

‘api’ is basically like the old ‘compile’ meaning that any ‘api’ components (recursively) can be used/called. ‘implementation’ allows only usage of the stated library/mod without the ability to directly call/use its dependencies. This explains it way better.

Read more comments on GitHub >

github_iconTop Results From Across the Web

documentation:fabric_loom [Fabric Wiki]
Loom and/or gradle can sometimes fail due to corrupted cache files. Running ./gradlew build –refresh-dependencies will force gradle and loom to ...
Read more >
How to manage Java dependencies with Maven - Red Hat
Dependency management is crucial, especially when an architecture uses applications that don't package all artifacts in a zip archive.
Read more >
Gradle maven-publish dependency scope - Stack Overflow
If you need to make a transitive dependency part of the compile scope, i.e. expose it on the compilation classpath of consuming projects,...
Read more >
Publishing a Kotlin library as a Gradle dependency to JitPack ...
This tutorial shows how to take a Kotlin library and publish it to the GitHub Package Registry and JitPack, as a dependency that...
Read more >
Maven Publish Plugin - Gradle User Manual
A project uses dynamic versions for dependencies but prefers exposing the resolved version for a given release to its consumers. In combination with...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found