| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
I can confirm that the gradle-wrapper.jar matches the one generated by Android Studio Hedgehog from https://developer.android.com/studio/archive -- specifically, “Android Studio Hedgehog | 2023.1.1 Patch 2 January 23, 2024”. But, one thing that's not clear to me: what is the license for these files? In the Android Studio repository, I couldn't find any license at all. The Android Studio download & installer made me agree to a “non-assignable, non-sublicensable” license, which limits what the SDK can be used for, and doesn't cover everything that Python's license allows. |
Sorry, something went wrong.
|
The three files gradlew, gradlew.bat and gradle-wrapper.jar (collectively the "Gradle wrapper"), originate from Gradle, which is used by Android Studio but is an independent project. Like the rest of Gradle, the wrapper is covered by the Apache license, and there's a notice indicating that at the top of the scripts. |
Sorry, something went wrong.
|
Concerns were raised on Discord that the source of the Gradle files wasn't clear enough, so I've updated them from the current version of Gradle (8.7). Here's how to verify them:
|
Sorry, something went wrong.
|
Thanks. The testing instructions added in Android/README.md are rather manual; I don't think an extra git clone would make things much worse for users. Including the jar means we're trusting a third party -- Gradle -- and their build process. I don't have a reason to trust them, and I don't think that CPython should implicitly vouch for them. If there are any license issues found later, it's much easier to remove things if they're in an isolated repo/branch. (And it's also easier for over-cautious redistributors to not include the testbed.) Note that I am a Linux distro packager by training, conditioned to include sources and avoid bundling. I might not be representing the CPython project well. I am definitely unfamiliar with mobile development practices. If you think I'm being unreasonable, please do seek other opinions, e.g. on Discourse. |
Sorry, something went wrong.
|
Thanks, that all makes sense.
Even simpler than a separate repository would be to add an option to the android.py script to obtain the Gradle wrapper directly from Gradle – essentially automating the steps listed in my previous comment. This would be no different from downloading compilers from a third party, as we do on every platform.
Actually I've got a pretty good idea of what can be pruned. My initial plan was to keep the app as close as possible to Android Studio's new project wizard output, but I guess that does include a lot of noise. Let me see what I can do. |
Sorry, something went wrong.
|
OK, I've removed the Gradle wrapper, added an android.py subcommand to download it, and removed all the unused boilerplate from the app, which should make the PR a lot more manageable. |
Sorry, something went wrong.
|
Thank you! This looks good; I haven't tested it. |
Sorry, something went wrong.
|
I've added a list of the required tools to the README. And I've also switched from wget to curl, because it's included with macOS. |
Sorry, something went wrong.
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
There was a problem hiding this comment.
Looks good, thank you!
I was able to start the test suite! (There were some errors, and I didn't wait for it to finish on my non-accelerated VM, but that shouldn't block this PR.)
I have some more suggestions for the guide, to help newbies like me.
Additionally, consider introducing the cross-build therm "host" here:
Additionally
Building for Android requires doing a cross-build where you have a "build"
- Python to help produce an Android build of CPython. This procedure has been
+ Python to help produce an Android build of CPython (the "host" build). This procedure has been
tested on Linux and macOS.
Sorry, something went wrong.
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Everything was passing on Android a couple of weeks ago, but unrelated development has introduced a few failures since then. The next priority will be to set up a buildbot so we can find out about such failures more quickly.
Done. |
Sorry, something went wrong.
There was a problem hiding this comment.
Looks good! Thank you!
Sorry, something went wrong.
Add code and config for a minimal Android app, and instructions to build and run it. Improve Android build instructions in general. Add a tool subcommand to download the Gradle wrapper (with its binary blob). Android studio must be downloaded manually (due to the license).
| Back | FazBrowse Home | New Git URL |
This PR adds a testbed app to run the Python test suite on Android. Instructions for using it are in Android/README.md.
Most of the files in this PR are boilerplate generated by the Android Studio new project wizard. To make it easier to review, I've split it into two commits:
Android app projects require a binary gradle-wrapper.jar, and two gradlew scripts to launch it. The integrity of these files can be verified by creating a new project in Android Studio Hedgehog – all three files in the new project should be identical to the versions in this PR.
Since myself and @freakboy3742 are now on the triage team, I've also added us to the CODEOWNERS file for Android and iOS respectively.