Skip to content

Conversation

@dbnicholson
Copy link
Contributor

This installs cmdline-tools in the "proper" way using sdkmanager itself. Mostly this is just moving the deck chairs around, but it also enables building using Java 11 on the host after learningequality/python-for-android#3.

This installs cmdline-tools using sdkmanager itself, which has a few
advantages:

* You no longer need to specify `--sdk_root` since it will detect the
  SDK install path when it's installed correctly.

* For a persistent installation, cmdline-tools can be updated and it
  will correctly replace the existing version.

* p4a will now try using `avdmanager` from `cmdline-tools/latest/bin`
  before the deprecated `tools/bin`. That allows using Java 11 on the
  host rather than Java 8 since the newer `avdmanager` doesn't try to
  use the removed `javax.xml` classes.

The downside is that cmdline-tools gets downloaded twice. I haven't seen
a way to cleanly bootstrap the SDK from a single download.
The whole point of installing cmdline-tools is to get sdkmanager, so the
recipe might as well specify that as the target. That way `make` can
tell that it doesn't need to do that again if the target gets pulled in.
@rtibbles
Copy link
Member

Hi @dbnicholson - sorry, I totally missed this PR. I've merged the relevant P4A PR on our fork, can you update this one with this hash f94ca9392c27eb30f46dab8a9583fb93d3ccafed for the P4A install, and I'll merge!

@dbnicholson
Copy link
Contributor Author

Hi @dbnicholson - sorry, I totally missed this PR. I've merged the relevant P4A PR on our fork, can you update this one with this hash f94ca9392c27eb30f46dab8a9583fb93d3ccafed for the P4A install, and I'll merge!

No problem. Updated now.

@rtibbles rtibbles merged commit af179e2 into learningequality:develop Jun 28, 2022
@dbnicholson dbnicholson deleted the proper-cmdlinetools branch September 13, 2022 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants