I want to to add the androidx source code to my Android Studio project instead of using the provided library (implementation \'androidx.core:core-ktx:1.1.0\').
(I don't have enough points to add a comment...)
As Martin said, Google has created a step by step guide how to download AndroidX, build it with gradle or Android Studio, make changes, import your custom build libs into your app, even contribute your changes upstream.
These repositories are usually being accessed with repo -
but for the sake of simplicity, git would also be supported:
git clone --branch androidx-master-dev https://android.googlesource.com/platform/frameworks/support /home/android/androidx-master-dev
Android Studio also supports git; the repository URL to check out would be https://android.googlesource.com/platform/frameworks/support and the branch is to select is eg. androidx-master-dev;. However, manually adding the library modules you need might be better.
Only the pre-built artifacts have version numbers, not the source-code. And it might only be known internally, which commit equals which version number; it doesn't seem to be publicly documented. See Android CI and Android Code Search; it says nothing about any version numbers there either.