Add stub version to apk comment

This commit is contained in:
vvb2060
2023-02-12 17:40:28 +08:00
committed by John Wu
parent a1a87c9956
commit 5520f0fbf7
5 changed files with 15 additions and 17 deletions

View File

@ -151,7 +151,9 @@ private fun Project.setupAppCommon() {
val variantCapped = name.replaceFirstChar { it.uppercase() }
tasks.getByPath(":$projectName:package$variantCapped").doLast {
val apk = outputs.files.asFileTree.filter { it.name.endsWith(".apk") }.singleFile
val comment = "version=${Config.version}\nversionCode=${Config.versionCode}"
val comment = "version=${Config.version}\n" +
"versionCode=${Config.versionCode}\n" +
"stubVersion=${Config.stubVersion}}\n"
addComment(apk, signingConfig, android.defaultConfig.minSdk!!, comment)
}
}