Referring to Third-party Libraries with Dependency
You can use third-party libraries for an adapter. Few third-party libraries have transitive dependencies. You have to include these dependencies in the lib folder.
Gradle supports reference to third-party libraries and then resolve the transitive dependencies.
To refer to third -party dependency for an adapter sub project:
-
Navigate to the JCenter repository (
https://bintray.com/bintray/jcenter) or to the Maven central repository (https://mvnrepository.com/repos/central). -
Select the required library and click Gradle.
-
Copy the dependency text.
The dependency text is in the form of compile
org.apache.commons:commons-lang3:3.9 -
Open the
build.gradlefile of the sub-project in a text editor. -
In the dependencies section, add the dependency text of step 3.
Adding the direct dependency on jackson-bind, includes the transitive dependency for jackson-core and jackson-annotations.