I’ve got a plug in that has a few dependencies tha...
# community-support
d
I’ve got a plug in that has a few dependencies that it looks for, but it appears that they’ve been removed from the remotes where they were pulled. I’ve been able to get them from the local cache on other machines. Is there a way for me to add the dependencies to the build scripts so that the plug in can work? I’ve been trying multiple different paths of using flatDirs, but none of them seem to work and I was curious if this was even possible to do.
t
Have you tried using a
file://
URL for a
maven()
repository? (and putting the files, including POMs, in a directory following the layout of a Maven repo)
d
I don’t have the pom files, which is part of the fun. As I dug through what is local, there’s the jar files under files-2.1 and the bin files under meta-data. What I had tried is in the buildScript{} block having
flatDirs {
dirs("${project.rootDir"/localjars")
}
dependencies {
classpath(fileTree(mapOf("dir" to "${project.rootDir}/localhars", "include" to listOf("*.jar"))))
}
I think I may have gotten it working. Found the respository it was originally published to and am working on publishing fully locally and then using the outputs as needed.
v
The thing you showed having is mixing up two things. What you should do is a
flatDir
repository and then dependency declarations as normal using coordinates. What you should not do is using
files
or
fileTree
, it somewhow works but has various quirks. What you should not do is combining the two, as that is not how it works.
d
The plug in producer has 3 jars that are created and uploaded to jcenter. The plug in uses those 3 jars when it runs. As they disappeared from jcenter (and naturally can’t be put back), I was taking the project locally and producing them to a project level maven repository. Not ideal to do, just something that doesn’t really have another choice until we can migrate off of that plug in entirely.
v
They did not exactly disappear from JCenter, it is just that JCenter degraded to a MavenCentral redirect finally. 😄
🤣 1