Skip to content
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

Add more dimensions, such as JDK and Android OS system image #73

Open
bartekpacia opened this issue Aug 19, 2024 · 3 comments · May be fixed by #74
Open

Add more dimensions, such as JDK and Android OS system image #73

bartekpacia opened this issue Aug 19, 2024 · 3 comments · May be fixed by #74
Labels
enhancement New feature or request feature

Comments

@bartekpacia
Copy link
Contributor

bartekpacia commented Aug 19, 2024

First of all – thanks for providing these.

In my use case, I need to run tests on many Android versions:

  • different JDK versions (preferably 8, 11, 17, 21)
  • different pre-installed system-image
    • reason: system-image installation takes a lot of time

New tags

Current tag example:

  • ghcr.io/cirruslabs/android-sdk:34

New tags examples:

  • ghcr.io/cirruslabs/android-sdk:33 (also keep older SDKs)
  • ghcr.io/cirruslabs/android-sdk:34-jdk-8
  • ghcr.io/cirruslabs/android-sdk:34-jdk-17

Problem

It's actually a bit more complicated, because some Android Command-line Tools (depended upon in the base image) versions have minimum Java requirement.

I didn't find a nice table with overview of what Android Command-line Tools require what Java – so I made some small research, and here's what I found:

  • Command-line Tools v8 is the last version to work with Java 8. v9+ requires Java 11+
  • Command-line Tools v10 is the last version to work on Java 11. v11+ requires Java 17+
  • Command-line Tools v16.0-alpha01 (latest as of now) still require Java 17+

btw, it's also hard to just download older versions of Command-line Tools in the first place.

Therefore, combinations of Command-line Tools with incompatible Java versions should be excluded. This means that Java version would determine version of Command-line Tools used:

  • ghcr.io/cirruslabs/android-sdk:*-jdk-8 would use CLT v8 (last supported on Java 8)
  • ghcr.io/cirruslabs/android-sdk:*-jdk-11 would use CLT v10 (last supported on Java 11)
  • ghcr.io/cirruslabs/android-sdk:*-jdk-17 would use CLT v13 (latest as of now; there are newer version of CLT but they're not stable. To see them yourself, see this)

Other

I don't see why someone would need both non-latest command-line tools and latest Java. On the other hand, I see why someone would need non-latest command-line tools and non-latest Java – for testing purposes (my use case - I have a CLI app that I need to make sure it works with Java 8).

@fkorotkov fkorotkov added enhancement New feature or request feature labels Aug 20, 2024
@fkorotkov
Copy link
Contributor

Does it mean you want parametrize

&& apt-get install -y openjdk-17-jdk \

We can probably just add them as arguments to Dockerfiles and then a matrix in .cirrus.yml.

@bartekpacia
Copy link
Contributor Author

bartekpacia commented Aug 20, 2024

I want to parametrize JDK version (which impacts Android CLT version), and system-image version.

I can do the PR, just wanting an "ok nod" :)

We can probably just add them as arguments to Dockerfiles and then a matrix in .cirrus.yml.

Essentially yes (but with some combinations excluded)

@fkorotkov
Copy link
Contributor

SGTM. Yeah, we can matrix by a tuple of JDK,CLT,system-images

@bartekpacia bartekpacia changed the title Add more dimensions, such as JDK and Android OS system image) Add more dimensions, such as JDK and Android OS system image Aug 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants