An open API service indexing awesome lists of open source software.

https://github.com/cosmic-ide/dependencyresolver

A powerful dependency resolver for maven repositories.
https://github.com/cosmic-ide/dependencyresolver

dependency-parser dependency-parsing dependency-resolution dependency-resolver hacktoberfest

Last synced: about 18 hours ago
JSON representation

A powerful dependency resolver for maven repositories.

Awesome Lists containing this project

README

        

# DependencyResolver

Provides a simple API to check for, and download artifacts from Maven Central, Google Maven and Jitpack.
It was created as a lightweight alternative to Eclipse aether for Android. But this would work on any OS.

It is recommended to use snapshot builds from jitpack.

For a proper example, checkout Main.kt.

For checking if an artifact exists (in the above mentioned repositories), you can simply do
```kt
val groupId = "com.squareup.retrofit2"
val artifactId = "retrofit"
val version = "2.9.0"

val artifact = getArtifact(groupId, artifactId, version)
val repository = artifact.repository
if (repository != null) {
println("Artifact exists in ${ repository.getName() }")
} else {
println("Cannot find artifact.")
}
```

NOTE: If you only want to download the artifact, you can use the `downloadTo` method instead.
For downloading an artifact with all of its dependencies, you can do
```kt
val output = File("")
artifact.downloadArtifact(output)
```