I have cloned the Square/Picasso Github repo, however, I did not find any Gradle files and therefore I am still stuck figuring out how to use the library and run the sample app as well. I want to use the code instead of the jar because I have few modifications I need in the library to use it.
Asked
Active
Viewed 473 times
2
-
Why not just copy the [main src](https://github.com/square/picasso/tree/master/picasso/src) files with your changes to your src folder? Or download the library, make the changes, build your changes and use that build – ugo May 15 '15 at 17:22
-
I want to keep it out of the code, and use it as a module instead. I don't know what I am missing, but I am still trying to have the code as a module and I can't do that since Android Studio keeps saying that it's not a Gradle project.. – Abdellah Benhammou May 15 '15 at 17:38
-
That's because Picasso *isn't* a Gradle project. It's a Maven project. Like I said, you could download the library, make your changes and build your own special .jar. Use `mvn clean package -Dmaven.test.skip=true` then check picasso/target for the .jar file – ugo May 15 '15 at 17:48
-
Thanks bro, that made things clear. you can put it as an answer for me to accept :D – Abdellah Benhammou May 15 '15 at 19:57
4 Answers
2
Following up from my comments in your question, if you want to use picasso with your changes, what you'll need to do is clone picasso, make your changes to the source, then run a Maven package task, if you have Maven:
mvn clean package -Dmaven.test.skip=true
If the build is successful, you will find your .jar file to use as a library, with all your changes, in directory picasso/target
.

ugo
- 2,705
- 2
- 30
- 34
0
I assume you're using Android Studio. Inside your build.gradle file, there is a dependencies section. Simply add the following to the list of dependencies
compile 'com.squareup.picasso:picasso:2.5.2'
And then sync your project. The Picasso library will be added to your project.

Bidhan
- 10,607
- 3
- 39
- 50
0
As Bidhan points out, in the Readme file you can find the info
Using Gradle:
compile 'com.squareup.picasso:picasso:2.5.2'
or Maven:
<dependency>
<groupId>com.squareup.picasso</groupId>
<artifactId>picasso</artifactId>
<version>2.5.2</version>
</dependency>

Jorgesys
- 124,308
- 23
- 334
- 268
0
Add this in your build.gradle
dependencies section:
compile 'com.squareup.picasso:picasso:2.5.1'

Jonas Czech
- 12,018
- 6
- 44
- 65

vrbsm
- 1,188
- 15
- 22