Skip to content

Commit f0c3d9b

Browse files
committed
Update android cmdlinetools: 12.0 => 19.0
1 parent 4e23c8b commit f0c3d9b

File tree

3 files changed

+16
-4
lines changed

3 files changed

+16
-4
lines changed

1k/1kiss.ps1

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#
66
# The MIT License (MIT)
77
#
8-
# Copyright (c) 2012-2024 HALX99
8+
# Copyright (c) 2012-2025 HALX99
99
#
1010
# Permission is hereby granted, free of charge, to any person obtaining a copy
1111
# of this software and associated documentation files (the "Software"), to deal
@@ -253,7 +253,10 @@ $cmake_generators = @{
253253
$channels = @{}
254254

255255
# refer to: https://developer.android.com/studio#command-line-tools-only
256-
$cmdlinetools_rev = '11076708' # 12.0
256+
$cmdlinetools_revs = @{
257+
'12.0' = '11076708'
258+
'19.0' = '13114758'
259+
}
257260

258261
$ndk_r23d_rev = '12186248'
259262
# $ndk_r25d_rev = '12161346'
@@ -563,6 +566,12 @@ if ([Regex]::Match($env:PATH, "`'|`"").Success) {
563566
throw "Please remove any `' or `" from your PATH list"
564567
}
565568

569+
# trim and get preferred version
570+
function trim_ver($pattern) {
571+
$vers = $pattern.Split('~')
572+
return $vers[$vers.Count -gt 1].TrimLast('+')
573+
}
574+
566575
# validate cmd follow symlink recurse
567576
function validate_cmd_fs($source, $root) {
568577
$fileinfo = Get-Item $source
@@ -1331,7 +1340,9 @@ function setup_android_sdk() {
13311340
$sdk_comps = @()
13321341

13331342
### cmdline-tools ###
1334-
$cmdlinetools_ver = $manifest['cmdlinetools']
1343+
$cmdlinetools_ver = trim_ver $manifest['cmdlinetools']
1344+
$cmdlinetools_rev = $cmdlinetools_revs[$cmdlinetools_ver]
1345+
13351346
$sdkmanager_prog, $sdkmanager_ver = $null, $null
13361347
$cmdlinetools_prefix = Join-Path $sdk_root "cmdline-tools"
13371348
$cmdlinetools_bin = Join-Path $cmdlinetools_prefix "$cmdlinetools_ver/bin"

1k/build.profiles

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ llvm=17.0.6~19.1.7+
3737
jdk=17.0.10~17.0.15+
3838

3939
# The android cmdline-tools aka sdkmanager, as stable as possible
40-
cmdlinetools=12.0
40+
cmdlinetools=19.0
4141

4242
# The android ndk version
4343
# as stable as possible @setup.ps1 @gradle @axmol-cmdline

1k/manifest.ps1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ $manifest['ndk'] = $build_profiles['ndk']
1818
$manifest['cmake'] = $build_profiles['cmake']
1919
$manifest['vs'] = $build_profiles['vs']
2020
$manifest['llvm'] = $build_profiles['llvm']
21+
$manifest['cmdlinetools'] = $build_profiles['cmdlinetools']
2122

2223
$Global:build_profiles = $build_profiles
2324

0 commit comments

Comments
 (0)