com.autonomousapps.model.DuplicateClass.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of dependency-analysis-gradle-plugin Show documentation
Show all versions of dependency-analysis-gradle-plugin Show documentation
Analyzes dependency usage in Android and JVM projects
package com.autonomousapps.model
import com.autonomousapps.internal.utils.LexicographicIterableComparator
import com.autonomousapps.model.declaration.Variant
import com.squareup.moshi.JsonClass
/**
* A fully-qualified [classReference] (`/`-delimited) that is provided by multiple [dependencies], and associated with a
* [variant].
*/
@JsonClass(generateAdapter = false)
data class DuplicateClass(
val variant: Variant,
val classpathName: String,
val classReference: String,
val dependencies: Set,
) : Comparable {
override fun compareTo(other: DuplicateClass): Int {
return compareBy(DuplicateClass::variant)
.thenBy(DuplicateClass::classpathName)
.thenBy(DuplicateClass::classReference)
.thenBy(LexicographicIterableComparator()) { it.dependencies }
.compare(this, other)
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy