diff options
Diffstat (limited to 'plugin/src/main/kotlin/moe/nea/archenemy/util/DigestUtils.kt')
-rw-r--r-- | plugin/src/main/kotlin/moe/nea/archenemy/util/DigestUtils.kt | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/plugin/src/main/kotlin/moe/nea/archenemy/util/DigestUtils.kt b/plugin/src/main/kotlin/moe/nea/archenemy/util/DigestUtils.kt index 4f50000..d2de936 100644 --- a/plugin/src/main/kotlin/moe/nea/archenemy/util/DigestUtils.kt +++ b/plugin/src/main/kotlin/moe/nea/archenemy/util/DigestUtils.kt @@ -1,5 +1,6 @@ package moe.nea.archenemy.util +import org.gradle.api.artifacts.ModuleDependency import java.security.MessageDigest fun MessageDigest.updateField(text: String, value: String) { @@ -11,4 +12,11 @@ fun MessageDigest.updateField(text: String, value: String) { fun MessageDigest.update(text: String) { this.update(text.encodeToByteArray()) +} + +fun MessageDigest.updateGMV(name: String, moduleDependency: ModuleDependency) { + this.updateField( + name, + (moduleDependency.group ?: "") + ":" + moduleDependency.name + ":" + (moduleDependency.version ?: "") + ) }
\ No newline at end of file |