I have a .jar file on my desktop and I would like to add it as a dependency on my project to use the existing methods on it. how do I do that?
            Asked
            
        
        
            Active
            
        
            Viewed 470 times
        
    0
            
            
        - 
                    Perhaps this post could help you [Including local jar file in project at build time using gradle](https://stackoverflow.com/a/12576972/11012656) – Johann Kexel Mar 10 '20 at 06:58
- 
                    I had already seen these posts and tested but it didn't work... – Karen Dias Mar 10 '20 at 12:58
1 Answers
1
            If your project is gradle.
Write code in jar method of build.gradle
configurations.compile.forEach {
    zipTree(it)
}
println list
from list
with jar
 
    
    
        logM
        
- 51
- 2
- 7
- 
                    
- 
                    jar{ configurations.compile.forEach { zipTree(it) } println list from list with jar } – logM Mar 10 '20 at 23:55
