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

Pin required specified build_tools_version for android_sdk_repository #3741

Merged
merged 2 commits into from
Aug 27, 2021

Conversation

FareesHussain
Copy link
Contributor

Explanation

Added the build_tools_version similar to the ci installation (documentation reference)
This will avoid local issues similar to #3510

with this, I guess we might avoid using the https://github.com/oppia/oppia-android/blob/develop/.github/actions/set-up-android-bazel-build-environment/action.yml for the CI

Checklist

  • The PR title starts with "Fix #bugnum: ", followed by a short, clear summary of the changes. (If this PR fixes part of an issue, prefix the title with "Fix part of #bugnum: ...".)
  • The PR explanation includes the words "Fixes #bugnum: ..." (or "Fixes part of #bugnum" if the PR only partially fixes an issue).
  • The PR follows the style guide.
  • The PR does not contain any unnecessary auto-generated code from Android Studio.
  • The PR is made from a branch that's not called "develop".
  • The PR is made from a branch that is up-to-date with "develop".
  • The PR's branch is based on "develop" and not on any other branch.
  • The PR is assigned to an appropriate reviewer in both the Assignees and the Reviewers sections.

@BenHenning
Copy link
Member

@FareesHussain does this actually prevent #3510? My understanding is that GitHub updated their environment to install build tools 30.0.0 by default which means 29.0.2 isn't available to use. Can you confirm? I suspect we still need the Actions CI.

Similarly, what's the behavior when you try building with this change & don't have 29.0.2 installed?

@FareesHussain
Copy link
Contributor Author

As mentioned in the documentation

Bazel will use the highest Android API level and build tools version installed in the Android SDK by default.

when build tool 30.0.0 was added to the ci we didn't have a specific build tools version.
and hence it was using the highest version (30.0.0 when we faced #3510)

we might require the CI actions incase 29.02 is removed from github CI, but for now, we can avoid ci actions if the specified versions are available

Similarly, what's the behavior when you try building with this change & don't have 29.0.2 installed?

lets suppose we have 30.0.0 installed locally and we try to build the android_binary.
we get the error after a while showing the dex error,
but if we use a specified version and it is not installed the build fails faster and shows that the build tool version is not installed,
It saves some time when contributors are getting started with bazel.
This was something I faced when I didn't have the android sdk 28 installed

This way the contributors need not remove the 30.0.0 build tool to build oppia.

@BenHenning
Copy link
Member

As mentioned in the documentation

Bazel will use the highest Android API level and build tools version installed in the Android SDK by default.

when build tool 30.0.0 was added to the ci we didn't have a specific build tools version.
and hence it was using the highest version (30.0.0 when we faced #3510)

we might require the CI actions incase 29.02 is removed from github CI, but for now, we can avoid ci actions if the specified versions are available

Similarly, what's the behavior when you try building with this change & don't have 29.0.2 installed?

lets suppose we have 30.0.0 installed locally and we try to build the android_binary.
we get the error after a while showing the dex error,
but if we use a specified version and it is not installed the build fails faster and shows that the build tool version is not installed,
It saves some time when contributors are getting started with bazel.
This was something I faced when I didn't have the android sdk 28 installed

This way the contributors need not remove the 30.0.0 build tool to build oppia.

That sounds good to me. Approving this--we can check if the CI action is needed after. Thanks!

@BenHenning BenHenning changed the title Using specified build_tools_version for android_sdk_repository Pin required specified build_tools_version for android_sdk_repository Aug 27, 2021
@BenHenning BenHenning merged commit 3d98349 into oppia:develop Aug 27, 2021
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