Release script: read the build tool version from Versions.kt

This commit is contained in:
Benoit Marty 2025-09-10 11:32:27 +02:00
parent b559065db9
commit 94f098d517
2 changed files with 5 additions and 3 deletions

View file

@ -38,9 +38,10 @@ object Versions {
const val VERSION_CODE = (2000 + versionYear) * 10_000 + versionMonth * 100 + versionReleaseNumber
val VERSION_NAME = "$versionYear.${versionMonth.toString().padStart(2, '0')}.$versionReleaseNumber"
// When updating COMPILE_SDK, please do not forget to update the value for `buildToolsVersion`
// in the file `tools/release/release.sh`
// When updating COMPILE_SDK, please also update BUILD_TOOLS_VERSION
const val COMPILE_SDK = 36
@Suppress("unused")
private const val BUILD_TOOLS_VERSION = "36.0.0"
const val TARGET_SDK = 36
// When updating the `minSdk`, make sure to update the value of `minSdkVersion` in the file `tools/release/release.sh`

View file

@ -64,7 +64,8 @@ fi
# Read minSdkVersion from file plugins/src/main/kotlin/Versions.kt
minSdkVersion=$(grep "MIN_SDK_FOSS =" ./plugins/src/main/kotlin/Versions.kt |cut -d '=' -f 2 |xargs)
buildToolsVersion="36.0.0"
# Read buildToolsVersion from file plugins/src/main/kotlin/Versions.kt
buildToolsVersion=$(grep "BUILD_TOOLS_VERSION =" ./plugins/src/main/kotlin/Versions.kt |cut -d '=' -f 2 |xargs)
buildToolsPath="${androidHome}/build-tools/${buildToolsVersion}"
if [[ ! -d ${buildToolsPath} ]]; then