Skip to content

Commit 94f098d

Browse files
committed
Release script: read the build tool version from Versions.kt
1 parent b559065 commit 94f098d

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

plugins/src/main/kotlin/Versions.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,10 @@ object Versions {
3838
const val VERSION_CODE = (2000 + versionYear) * 10_000 + versionMonth * 100 + versionReleaseNumber
3939
val VERSION_NAME = "$versionYear.${versionMonth.toString().padStart(2, '0')}.$versionReleaseNumber"
4040

41-
// When updating COMPILE_SDK, please do not forget to update the value for `buildToolsVersion`
42-
// in the file `tools/release/release.sh`
41+
// When updating COMPILE_SDK, please also update BUILD_TOOLS_VERSION
4342
const val COMPILE_SDK = 36
43+
@Suppress("unused")
44+
private const val BUILD_TOOLS_VERSION = "36.0.0"
4445
const val TARGET_SDK = 36
4546

4647
// When updating the `minSdk`, make sure to update the value of `minSdkVersion` in the file `tools/release/release.sh`

tools/release/release.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@ fi
6464

6565
# Read minSdkVersion from file plugins/src/main/kotlin/Versions.kt
6666
minSdkVersion=$(grep "MIN_SDK_FOSS =" ./plugins/src/main/kotlin/Versions.kt |cut -d '=' -f 2 |xargs)
67-
buildToolsVersion="36.0.0"
67+
# Read buildToolsVersion from file plugins/src/main/kotlin/Versions.kt
68+
buildToolsVersion=$(grep "BUILD_TOOLS_VERSION =" ./plugins/src/main/kotlin/Versions.kt |cut -d '=' -f 2 |xargs)
6869
buildToolsPath="${androidHome}/build-tools/${buildToolsVersion}"
6970

7071
if [[ ! -d ${buildToolsPath} ]]; then

0 commit comments

Comments
 (0)