android / ndk

The Android Native Development Kit
1.94k stars 254 forks source link

Please provide maintainable list of NDK codename-revision pairs #2042

Open basilgello opened 1 month ago

basilgello commented 1 month ago

In certain situations like F-Droid builds it is necessary to have a mapping of NDK codename (r26d) to revision (26.3.xxxxx), since sdkmanager from Android SDK does not know MDK codenames.

I made a quick one-liner to retrieve NDK revision from released tags in this repo:

wget \
  -qO- \
  -H "Accept: application/vnd.github+json" \
  -H "X-GitHub-Api-Version: 2022-11-28" \
  'https://api.github.com/repos/android/ndk/releases' |
  jq \
   -r \
   '.[] | select(.tag_name == "r27-beta1") | .body | match("ndkVersion \"(.*)\"").captures[0].string'

but tagged releases start from r26.

To provide single source of truth on this matter, it would be best to have releases tagged for older NDKs up to r11 but I am not sure if it possible to back-date Github releases so they dont become the 'latest' one. Another option is to have automatically generated JSON/YAML/TOML file with mappings like:

r26=26.0.11112

@DanAlbert What do you think?

DanAlbert commented 1 month ago

You mean this? https://github.com/android/ndk/wiki (and https://github.com/android/ndk/wiki/Unsupported-Downloads for the unsupported releases)

I keep asking Studio to handle our version scheme. I think they agree, there's just no capacity for making it happen.

basilgello commented 1 month ago

Yes, this one. With more sophisticated regexp-ing it may be done but I guess some automatic step generating the file is better

DanAlbert commented 1 month ago

I guess I'm not really sure what you're asking me to do. The data is already published.