Skip to content
This repository was archived by the owner on Jul 16, 2024. It is now read-only.

Commit 7d2de45

Browse files
committed
gradle 优化
1 parent 1081a88 commit 7d2de45

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

buildSrc/src/main/kotlin/Extensions.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ const val extraScriptPath = "gradle/extra.gradle"
3636
val gitCommitCount: String by lazy { "git describe --tags".exec() }
3737
val gitCommitDescribe: Int by lazy { "git rev-list HEAD --count".exec().toInt() }
3838

39-
fun String.exec(): String =
40-
Runtime.getRuntime().exec(this).inputStream.readBytes().toString(Charset.defaultCharset()).trim()
39+
fun String.exec(): String = Runtime.getRuntime().exec(this).inputStream.readBytes()
40+
.toString(Charset.defaultCharset()).trim()
4141

4242
fun ScriptHandlerScope.classpaths(vararg names: Any): Array<Dependency?> =
4343
dependencies.config("classpath", *names)
@@ -101,7 +101,7 @@ inline fun <reified T : BaseExtension> Project.setupBase(
101101
applyPlugins(Plugins.kotlinAndroid, Plugins.kotlinKapt)
102102
extensions.configure<BaseExtension>("android") {
103103
compileSdkVersion(30)
104-
buildToolsVersion("30.0.3")
104+
buildToolsVersion = "30.0.3"
105105
defaultConfig {
106106
minSdk = 21
107107
targetSdk = 30

0 commit comments

Comments
 (0)