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

Allow the default Android app API version to be overwritten by environment variable. #92

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

khalilgharbaoui
Copy link

@khalilgharbaoui khalilgharbaoui commented Sep 19, 2020

The Android app API version is hardcoded to version 23.
Which forces people to install the API version 23 when they try to run any kind of rake task,
for example rake android:device or even rake android:spec will result in:

$ rake android:spec --trace

** Invoke android:spec (first_time)
** Execute android:spec
    ERROR! The Android SDK installed on your system does not support API level 23. Run 'motion android-setup --api_version=23' to install it.

Allowing users to optionally overwrite this hardcoded value with an environment variable ANDROID_APP_API_VERSION provides a bit more flexibility.

Otherwise, it might be annoying because what if for example a user wants to set up and use API version 28 only without having to deal with version 23.

TL;DR

The optional ANDROID_APP_API_VERSION environment variable in this PR does not change/break the current gem behavior in any way.
And it may not be a long term solution but It does allow for some clarity and flexibility when it comes to picking the Android API version for a project.

Please accept.

Cheers,
Khalil

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.

1 participant