I included a local *.jar file (library) as described here..
Now, I committed the Android project to github and the previous setting of that local jar file seem to be missing.
Whenever colleagues checkout that project, they do not have the path to that other jar-file.
Questions:
libs
folder in my app module. What would be the pros and cons compared to 1?I always prefer a simple approach like:
Copy your JAR file to your module libs
folder.
Add the dependency in the build.gradle
file
In build.gradle
:
dependencies {
// Dependency on local binaries
implementation fileTree(dir: 'libs', include: ['*.jar'])
//Alternatively, you can specify individual files as follows:
//implementation files('libs/myJar.jar', 'libs/bar.jar')
//..
}
It is not related to a particular procedure to follow, it works with different IDE (also in a CI environment), just all the code and the jars file are in the git repo and the build.gradle script is enough to build the project.