Skip to content

Commit ac6e158

Browse files
committed
Initial commit
1 parent 3a0c24e commit ac6e158

14 files changed

Lines changed: 594 additions & 0 deletions

File tree

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Ignore Gradle project-specific cache directory
2+
.gradle
3+
4+
# Ignore Gradle build output directory
5+
build

README.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# DependencyResolver
2+
3+
Provides a simple API to check for, and download artifacts from Maven Central, Google Maven and Jitpack.
4+
It was created as a lightweight alternative to Eclipse aether for Android. But this would work on any OS.
5+
6+
For checking if an artifact exists (in the above mentioned repositories), you can simply do
7+
```kt
8+
import org.cosmic.ide.dependency.resolver.getArtifact
9+
10+
val groupId = "com.squareup.retrofit2"
11+
val artifactId = "retrofit"
12+
val version = "2.9.0"
13+
14+
val artifact = getArtifact(groupId, artifactId, version)
15+
val repository = artifact.repository
16+
if (repository != null) {
17+
println("Artifact exists in ${ repository.getName() }")
18+
} else {
19+
println("Cannot find artifact.")
20+
}
21+
```
22+
23+
For downloading an artifact with all of its dependencies, you can do
24+
```kt
25+
val output = File("<directory to download artifact>")
26+
artifact.downloadArtifact(output)
27+
```

gradle/wrapper/gradle-wrapper.jar

60.1 KB
Binary file not shown.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
distributionBase=GRADLE_USER_HOME
2+
distributionPath=wrapper/dists
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
4+
networkTimeout=10000
5+
zipStoreBase=GRADLE_USER_HOME
6+
zipStorePath=wrapper/dists

gradlew

Lines changed: 244 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gradlew.bat

Lines changed: 92 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/build.gradle.kts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
plugins {
2+
id("org.jetbrains.kotlin.jvm") version "1.8.10"
3+
}
4+
5+
repositories {
6+
mavenCentral()
7+
}

0 commit comments

Comments
 (0)