-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from Project-Cepi/master
Fix up dependency getter, and use Path instead of File
- Loading branch information
Showing
12 changed files
with
113 additions
and
125 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
plugins { | ||
// Apply the Kotlin JVM plugin to add support for Kotlin. | ||
id("org.jetbrains.kotlin.jvm") version "1.5.31" | ||
|
||
java | ||
} | ||
group = "net.minestom" | ||
version = "1.0.0" | ||
|
||
repositories { | ||
mavenCentral() | ||
} | ||
|
||
dependencies { | ||
|
||
// Use the Kotlin JDK 8 standard library. | ||
implementation(kotlin("stdlib", "1.5.0")) | ||
|
||
// Add shrinkwrap resolver | ||
implementation("org.jboss.shrinkwrap.resolver:shrinkwrap-resolver-depchain:3.1.4") | ||
|
||
// Use the kotlin test library | ||
testImplementation("io.kotest:kotest-assertions-core:4.6.3") | ||
testImplementation("io.kotest:kotest-runner-junit5:4.6.3") | ||
} | ||
|
||
tasks { | ||
withType<Test> { useJUnitPlatform() } | ||
} | ||
|
||
val compileKotlin: org.jetbrains.kotlin.gradle.tasks.KotlinCompile by tasks | ||
compileKotlin.kotlinOptions.jvmTarget = JavaVersion.VERSION_16.toString() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.3-bin.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
|
||
rootProject.name = "DependencyGetter" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
src/main/kotlin/net/minestom/dependencies/ResolvedDependency.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package net.minestom.dependencies | ||
|
||
import java.net.URL | ||
|
||
/** | ||
* Resolved Dependency. | ||
* Holds its coordinates (group, artifact, version), which are allowed to be empty if needed | ||
* | ||
* The contentsLocation URL represents the location of the dependency, on local storage. | ||
*/ | ||
data class ResolvedDependency( | ||
val group: String, val name: String, val version: String, | ||
val contentsLocation: URL, val subdependencies: List<ResolvedDependency> | ||
) { | ||
fun printTree(indent: String = "") { | ||
println("$indent- $group:$name:$version ($contentsLocation)") | ||
subdependencies.forEach { it.printTree("$indent ") } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters