Skip to content

Support API levels for SDK extensions and add missing targets for automotive and desktop. #428

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Mar 28, 2025

Conversation

TimoPtr
Copy link
Contributor

@TimoPtr TimoPtr commented Mar 17, 2025

Fixes #429.

This action is missing some targets. I am currently working into using this action into https://github.com/home-assistant/android/ and I need the android-automotive target. I've added all the targets that I found missing.
I don't have the opportunity to test them on Github Action yet.


Added targets:

  • android-automotive
  • android-automotive-playstore
  • android-desktop

Also added system-image-api-level to support specifying different api-levels for platform and system images as they aren't always aligned for sdk extensions.

Removed input validation on api-level so SDK extensions e.g. android-35-ext15 and preview API levels e.g. android-Baklava are supported.

@TimoPtr
Copy link
Contributor Author

TimoPtr commented Mar 18, 2025

This PR fix this issue #429

@TimoPtr
Copy link
Contributor Author

TimoPtr commented Mar 18, 2025

@ychescale9 Should I update the changelog too?

@ychescale9
Copy link
Member

@TimoPtr Thanks for the contribution!

Is it possible to add the sdk extension in a separate PR or is it related to these new targets?

I'll take a closer look at your changes on the weekend.

@TimoPtr
Copy link
Contributor Author

TimoPtr commented Mar 18, 2025

It can be two PR if you prefer. But for instance both changes are needed for the latest version of android-automotive to work.

@ychescale9
Copy link
Member

In that case let's do both in this PR.

@TimoPtr
Copy link
Contributor Author

TimoPtr commented Mar 19, 2025

Just found out that the platforms might not be the same ...
image that is why the test fail platforms;android-34-ext9 fail but platforms;android-34-ext10 exist. Does it make sense to split sdk-extension in two? One for the platforms and a second one for the image?

@ychescale9
Copy link
Member

Well that's annoying 😅 .

At this point I'm a bit tempted to give up on validating api-level and just let users provide any arbitrary strings. This means we don't need to make such assumption on the api-level naming convention - ${apiLevel}-ext${sdkExtension}, and users can start using preview version of the SDK e.g. android-Baklava without having to wait for us to update the allowlist ['Tiramisu', 'UpsideDownCake', 'VanillaIceCream', 'Baklava'] we maintain.

So the SDK platform we use would remain platforms;android-${api-level}.

We can then add an optional system-image-api-level which defaults to api-level if not provided, where you can override the api-level used for system-images.

E.g.

api-level: 35-ext14
system-image-api-level: 35-ext15
target: android-wear
arch: x86_64

Please let me know what you think.

@TimoPtr
Copy link
Contributor Author

TimoPtr commented Mar 22, 2025

For sure that solve the issue and it easier when Google is going to introduce something new again.

@TimoPtr
Copy link
Contributor Author

TimoPtr commented Mar 24, 2025

@ychescale9 I've made the modification

@TimoPtr TimoPtr requested a review from ychescale9 March 28, 2025 12:42
@ychescale9
Copy link
Member

Obviously out of scope for this change, but a better way to validate the api-level, target, and arch is to download the XML files on the fly from these URLs and parse them to check whether the requested combination exists:

image

This would also save people a lot of time figuring out why the emulator doesn't run when they've requested for a system image that doesn't exist.

@ychescale9
Copy link
Member

@TimoPtr I just checked the output of sdkmanager --list again and looks like the same -ext version for both platforms and system-images are now available?

@TimoPtr
Copy link
Contributor Author

TimoPtr commented Mar 28, 2025

@TimoPtr I just checked the output of sdkmanager --list again and looks like the same -ext version for both platforms and system-images are now available?

That's weird on my side I don't have platforms;android-34-ext9 but I have -ext10, 11, 12 ... I think it's safer to let the user of the action pick the versions it wants. It seems that the versions are not released together.

@ychescale9
Copy link
Member

@TimoPtr I just checked the output of sdkmanager --list again and looks like the same -ext version for both platforms and system-images are now available?

That's weird on my side I don't have platforms;android-34-ext9 but I have -ext10, 11, 12 ... I think it's safer to let the user of the action pick the versions it wants. It seems that the versions are not released together.

Yeah you're right, but at least the latest ext version is aligned now which definitely wasn't the cast last week.

@ychescale9 ychescale9 changed the title Add missing targets Support API levels for SDK extensions and add missing targets for automotive and desktop. Mar 28, 2025
Copy link
Member

@ychescale9 ychescale9 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks again for your contribution!

@ychescale9 ychescale9 merged commit a173d65 into ReactiveCircus:main Mar 28, 2025
7 checks passed
ychescale9 added a commit that referenced this pull request Mar 28, 2025
* main:
  Prepare for release 2.34.0.
  Update README.md and CHANGELOG.md.
  Support API levels for SDK extensions and add missing targets for automotive and desktop. (#428)
  Add `Baklava` support (#424)
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.

API-LEVEL does not work with latest version within the latest sdk like (35-ext15)
2 participants