Skip to content

Commit ec8863a

Browse files
committed
修改readme
1 parent 92ee8fe commit ec8863a

File tree

1 file changed

+18
-8
lines changed

1 file changed

+18
-8
lines changed

build.gradle.kts

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ fun getAppVCode():Int {
5555
return updateVersionString.toInt()
5656
}
5757

58-
task ("bumpVersion", {
58+
task ("bumpVersion") {
5959
doLast {
6060
val versionName = getAppVCode() + 1
6161
val str = versionName.toString()
@@ -80,13 +80,15 @@ task ("bumpVersion", {
8080

8181
val gradleFile = File("gradle.properties")
8282
val gradleText = gradleFile.readText()
83-
val text2 = gradleText.replace("TestVersion = "+oldVersionName,"TestVersion = "+newVersionName)
83+
val text2 = gradleText.replace("TestVersion = $oldVersionName",
84+
"TestVersion = $newVersionName"
85+
)
8486

8587

8688
gradleFile.writeText(text2)
87-
println("升级版本号完成,versionName = "+newVersionName)
89+
println("升级版本号完成,versionName = $newVersionName")
8890
}
89-
})
91+
}
9092

9193
fun updateLib(readme :String,oldVersionName :String,newVersionName :String) {
9294
val configFile = File(readme)
@@ -98,10 +100,18 @@ fun updateLib(readme :String,oldVersionName :String,newVersionName :String) {
98100
fun updateREADME(readme :String,oldVersionName :String,newVersionName :String) {
99101
val configFile = File(readme)
100102
val exportText = configFile.readText()
101-
var text = exportText.replace("io.github.FlyJingFish.ModuleCommunication:module-communication-plugin:"+oldVersionName,"io.github.FlyJingFish.ModuleCommunication:module-communication-plugin:"+newVersionName)
102-
text = text.replace("io.github.FlyJingFish.ModuleCommunication:module-communication-annotation:"+oldVersionName,"io.github.FlyJingFish.ModuleCommunication:module-communication-annotation:"+newVersionName)
103-
text = text.replace("io.github.FlyJingFish.ModuleCommunication:module-communication-intercept:"+oldVersionName,"io.github.FlyJingFish.ModuleCommunication:module-communication-intercept:"+newVersionName)
104-
text = text.replace("io.github.FlyJingFish.ModuleCommunication:module-communication-route:"+oldVersionName,"io.github.FlyJingFish.ModuleCommunication:module-communication-route:"+newVersionName)
103+
var text = exportText.replace("io.github.FlyJingFish.ModuleCommunication:module-communication-plugin:$oldVersionName",
104+
"io.github.FlyJingFish.ModuleCommunication:module-communication-plugin:$newVersionName"
105+
)
106+
text = text.replace("io.github.FlyJingFish.ModuleCommunication:module-communication-annotation:$oldVersionName",
107+
"io.github.FlyJingFish.ModuleCommunication:module-communication-annotation:$newVersionName"
108+
)
109+
text = text.replace("io.github.FlyJingFish.ModuleCommunication:module-communication-intercept:$oldVersionName",
110+
"io.github.FlyJingFish.ModuleCommunication:module-communication-intercept:$newVersionName"
111+
)
112+
text = text.replace("io.github.FlyJingFish.ModuleCommunication:module-communication-route:$oldVersionName",
113+
"io.github.FlyJingFish.ModuleCommunication:module-communication-route:$newVersionName"
114+
)
105115
configFile.writeText(text)
106116
}
107117
val appVersionName = getAppVName()

0 commit comments

Comments
 (0)