Nathan Kleinschmidt
03/27/2022, 3:04 PMimplementation(files(./dependency))
. My question is which path exactly do I need to reference?Joffrey
03/27/2022, 3:07 PMincludeBuild
feature from settings.gradle.kts
Nathan Kleinschmidt
03/27/2022, 4:29 PMincludeBuild
. I’m not particularly worried about updates since I can always pull them from the repo. This would be mostly for development purposes, as a way to run code that was maybe not yet published to Maven. Someone else recommended looking into gradle composite builds.Vampire
03/27/2022, 4:40 PMincludeBuild
is creatingEmerson Farrugia
03/27/2022, 4:44 PMpublishing
configuration to build the binary dependency and store it in mavenLocal()
, and configure your own project to resolve dependencies from mavenLocal
to get the binary from there.Nathan Kleinschmidt
03/27/2022, 4:46 PM./gradlew build
Vampire
03/27/2022, 5:07 PMIf it's a third-party project you want to keep isolated from your own, you can also clone the third-party repo, add aBut why use the Maven style when you can do it much more convenient using composite build? Besides thatconfiguration to build the binary dependency and store it inpublishing
, and configure your own project to resolve dependencies frommavenLocal()
to get the binary from there.mavenLocal
mavenLocal
should be avoided wherever possible, or at most be used with a content filter, as it is broken by design.Joffrey
03/27/2022, 5:10 PMVampire
03/27/2022, 5:16 PMmavenLocal()
, it should be the last in the list and you should optimally always use a repository content filter to define which exact dependencies to take from it where you know they are in proper shape.
Alternatively, especially in your use-case, use any other dedicated local directory as repository, it does not have to be mavenLocal()
.Emerson Farrugia
03/27/2022, 7:54 PMBut why use the Maven style when you can do it much more convenient using composite build?It's just an alternative, and it'd work if the dependency is built from a Maven project rather than a Gradle one (it wasn't clear from the question, and I'm still not sure after re-reading it.) Composite builds also effectively ignore version numbers, which can be problematic if you need to switch between local and published versions for testing purposes. But FWIW, I agree that composite builds are the saner solution. 🙂
Joffrey
03/28/2022, 12:12 AMpublishToMavenLocal
of one module, and then using that repo at runtime to download the corresponding artifact, so it will be completely there. I wasn't aware that generally we couldn't expect the complete artifact files to be there. That's only when using Maven, right? Or does Gradle do the same thing?Vampire
03/28/2022, 12:17 AM