Skip to content

Commit

Permalink
Removed currently unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
janniclas committed May 27, 2024
1 parent 1f6326e commit da6f1bb
Show file tree
Hide file tree
Showing 25 changed files with 470 additions and 908 deletions.
191 changes: 0 additions & 191 deletions src/main/kotlin/artifact/ArtifactService.kt

This file was deleted.

26 changes: 22 additions & 4 deletions src/main/kotlin/artifact/model/DependencyGraphs.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,16 @@ import io.github.z4kn4fein.semver.toVersion
import kotlinx.serialization.Serializable

@Serializable
data class ArtifactNode(
data class ArtifactNode private constructor(
val artifactIdx: Int, // Index of the artifact in the DependencyGraphs' artifacts list
val usedVersion: String, // Version of the linked artifact used in this specific node
)
val usedVersion: String,
) {
companion object {
fun create(artifactIdx: Int, version: String): ArtifactNode {
return ArtifactNode(artifactIdx, ArtifactVersion.validateAndHarmonizeVersionString(version))
}
}
}

@Serializable
data class ArtifactNodeEdge(
Expand Down Expand Up @@ -82,7 +88,7 @@ data class Artifact(
)

@Serializable
data class ArtifactVersion(
data class ArtifactVersion private constructor(
val versionNumber: String,
val releaseDate: Long,
val isDefault: Boolean = false
Expand All @@ -93,6 +99,18 @@ data class ArtifactVersion(
}

companion object {
fun create(versionNumber: String, releaseDate: Long, isDefault: Boolean = false): ArtifactVersion {
return ArtifactVersion(
releaseDate = releaseDate,
isDefault = false,
versionNumber = validateAndHarmonizeVersionString(versionNumber)
)
}

fun validateAndHarmonizeVersionString(version: String): String {
return version.toVersion(strict = false).toString()
}

fun findHighestApplicableVersion(
version: String,
versions: List<ArtifactVersion>,
Expand Down
26 changes: 0 additions & 26 deletions src/main/kotlin/artifact/model/PackageReferenceDto.kt

This file was deleted.

49 changes: 0 additions & 49 deletions src/main/kotlin/commands/AnalyzeVersions.kt

This file was deleted.

21 changes: 0 additions & 21 deletions src/main/kotlin/commands/GetVersions.kt

This file was deleted.

17 changes: 0 additions & 17 deletions src/main/kotlin/commands/options/DbOptions.kt

This file was deleted.

Loading

0 comments on commit da6f1bb

Please sign in to comment.