0

I have loaded several jar files onto a host using curl command line. Now I would like to resolve the dependencies under Gradle'e dependencies block.

I have tried:

maven {
  url "xxxxxx"
  artifact() 
}

and

flatDir { 
      dirs 'http://....' 
}

on How to add local .jar file dependency to build.gradle file?

and use the relative path under compile "relativePath" but no luck.

Does anyone have tried this before?

Many thanks

Guifan Li
  • 1,543
  • 5
  • 14
  • 28
  • 1
    Possible duplicate of [How to add local .jar file dependency to build.gradle file?](https://stackoverflow.com/questions/20700053/how-to-add-local-jar-file-dependency-to-build-gradle-file) – the question here does not really have anything to do with `curl` (it doesn't matter how the file was put onto the host. Could as well have been copied with a USB drive) – knittl Sep 12 '19 at 20:23
  • @knittl Are you saying I should do something like: flatDir { dirs 'http://....' } then use a relative path under the url to resolve the dependency? – Guifan Li Sep 12 '19 at 20:46
  • No, I'm saying you should specify the relative path on your PC where you downloaded the file. You wrote "I have loaded several jar files onto a host using curl command line" – which I read as: the files have already been downloaded and are available as files locally – knittl Sep 13 '19 at 05:44
  • @knittl Sorry about my expression. I mean I want to use curl to get dependencies on the fly instead of loading the jar from local host. – Guifan Li Sep 13 '19 at 11:02

0 Answers0