refine gradle

This commit is contained in:
5ec1cff
2024-07-29 23:59:15 +08:00
parent 643eb7d909
commit 3a515c5fe1
4 changed files with 16 additions and 25 deletions

View File

@@ -1,8 +1,6 @@
import com.android.build.gradle.AppExtension
import com.android.build.gradle.LibraryExtension
import org.jetbrains.kotlin.daemon.common.toHexString
import java.io.ByteArrayOutputStream
import java.security.MessageDigest
plugins {
alias(libs.plugins.agp.app) apply false
@@ -33,18 +31,6 @@ val verCode by extra(gitCommitCount)
val commitHash by extra(gitCommitHash)
val abiList by extra(listOf("arm64-v8a", "x86_64"))
fun calculateChecksum(): String {
return MessageDigest.getInstance("SHA-256").run {
update(moduleId.toByteArray(Charsets.UTF_8))
update(moduleName.toByteArray(Charsets.UTF_8))
update(verName.toByteArray(Charsets.UTF_8))
update(verCode.toString().toByteArray(Charsets.UTF_8))
update(author.toByteArray(Charsets.UTF_8))
update(description.toByteArray(Charsets.UTF_8))
digest().toHexString()
}
}
val androidMinSdkVersion by extra(31)
val androidTargetSdkVersion by extra(34)
val androidCompileSdkVersion by extra(34)