Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install artifacts into the local gradle filestore

Tags:

maven

gradle

Can anyone tell me how to install an artifact/project into the local gradle filestore?

gradle install

installs it to the local maven repository but I need to have it in

~/.gradle/caches/artifacts-15/filestore
like image 391
myborobudur Avatar asked Dec 12 '12 08:12

myborobudur


People also ask

Where is the Gradle local repository?

Gradle's local repository folder is: $USER_HOME/. gradle/caches/modules-2/files-2.1.

Where is Gradle local cache?

Local Build Cache. The local build cache uses a system directory to store tasks outputs. The default location is the Gradle user home directory that points to $USER_HOME/. gradle/caches.


2 Answers

It's a pure cache, and you can't install into it (by design). If you could, reproducibility would suffer (build works on one machine but not on another).

like image 135
Peter Niederwieser Avatar answered Nov 15 '22 03:11

Peter Niederwieser


If you install it to your local maven repository and refer to the repository in you gradle build file, you will have solved your problem.

See

Is there a way to install jar local gradle repository, as it in mave (maven install:install-file

EDIT: You don't even have to install the jar into your maven repo:

https://stackoverflow.com/a/13531958/260122

like image 37
clacke Avatar answered Nov 15 '22 03:11

clacke